Implementation of the Fibonacci sequence algorithm in Shell
Run the script
$ bash fibonacci
Type the number of months
Fibonacci Sequence
Enter the number of months to know the number of rabbits:
Show the result
Fibonacci Sequence
Enter the number of months to know the number of rabbits: 12
Month: 0, number of rabbits: 0
Month: 1, number of rabbits: 1
Month: 2, number of rabbits: 1
Month: 3, number of rabbits: 2
Month: 4, number of rabbits: 3
Month: 5, number of rabbits: 5
Month: 6, number of rabbits: 8
Month: 7, number of rabbits: 13
Month: 8, number of rabbits: 21
Month: 9, number of rabbits: 34
Month: 10, number of rabbits: 55
Month: 11, number of rabbits: 89
Month: 12, number of rabbits: 144