Shell Program for Fibbonacci Series Assignment Help

Assignment Help: >> Advanced Shell Scripts - Shell Program for Fibbonacci Series

Practice 1

The given shell program will produce the fibonacci series  that are represent like 0,1,1,2,3,5,8,13,......

# vi whilefib

n1=0

n2=1

echo $n1

while [ $n2 -lt 200 ]

do

echo $n2

n2='expr $n2   + $n2 '

n1='expr $n2 - $n1'

done

# sh whilefib

0

1

1

2

3

5

8

13

21

The given program uses the while statement to produce the fibonacci series.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd