Pr-requisite: Fibonacci Series
Write a program to print the Fibonacci sequence up to nth digit using Bash.
Input : 5 Output : Fibonacci Series is : 0 1 1 2 3 Input :4 Output : Fibonacci Series is : 0 1 1 2
The Fibonacci numbers are the numbers in the following integer sequence .
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..
As we know F0 = 0 and F1 = 1 and the next value comes by adding the previous two values .
FN = FN-1 + FN-2
Loop to Nth number adding previous two numbers.
Fibonacci Series is : 0 1 1 2 3 5 8
- Write a bash script to print a particular line from a file
- Bash program to check if the Number is a Prime or not
- Useful and time saving bash commands in Linux
- Average of given numbers in Bash
- Bash program to find A to the power B
- Bash program to check if the Number is a Palindrome
- Sorting an array in Bash using Bubble sort
- Simple Calculator in Bash
- Bash shell script to find sum of digits
- Programs for printing different patterns in Bash
- Bash shell script to swap two numbers
- Bash Script to get Low Battery Alert in Linux
- Bash shell script to find out the largest value from given command line arguments
- How to Fix Minimal BASH Like Line Editing is Supported GRUB Error In Linux?
- Leap Year Program with Bash Shell Scripting in Windows
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.