#fibonacci
echo "Enter a number"
read n
echo "Displaying fibonacci series upto " $n
a=-1
b=1
c=` expr $a \+ $b `
while [ $c -le $n ]
do
echo $c
a=$b
b=$c
c=` expr $a \+ $b `
done
echo "Enter a number"
read n
echo "Displaying fibonacci series upto " $n
a=-1
b=1
c=` expr $a \+ $b `
while [ $c -le $n ]
do
echo $c
a=$b
b=$c
c=` expr $a \+ $b `
done
Comments