Fibonacci Series Program in C

| Last Updated: | In: C Programming Tutorial


Sometimes back, one of my user our website is asked to create a program in c to get the Fibonacci series of any given number. Additionally, I have also shared a program to get the Fibonacci series of first 15 numbers without using the recursion.

What is Fibonacci Series

Fibonacci number is the number of any number in the series is obtained by adding previous two numbers of the series.

List of Fibonacci numbers

Below is the list of the first 21 Fibonacci series numbers Fn for n = 0, 1, 2, …, 20 are:

How to get the fabonacci number of any given number

If you want to get the Fibonacci number of any input number by the user by using the Fibonacci series formula Fn-1 + Fn-2. Example if user enters number 9, then the Fibonacci number is 34. Below is the example of Fibonacci series in C programming by using recursion.

Output of above program is:

Another example of Fibonacci series is using dynamic programming.

Output of above program is:

Fibonacci Series in C Without Using Recursion

Output of above program is:


About: Prem Tiwari

Prem Tiwari is the founder of freewebmentor.com and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


You may also like:

Tags: , , , ,