C Program to Print Fibonacci Series Using Recursion
A series of numbers in which each number ( Fibonacci number ) is the sum of the two preceding numbers. The simplest is the series 1, 1, 2, 3, 5, 8, etc.
//C program to print Fibonacci series using recursion
int a, i = 0, c;
printf(" enter number of elements wanted :");
scanf("%d",&a); // user input
for ( c = 1 ; c <= a ; c++ )
printf("%d\n", Fibo(i)); //calling the recursive function
int Fibo(int a) //recursive function Fibo
if ( a == 0 )
else if ( a == 1 )
return ( Fibonacci(a-1) + Fibonacci(a-2) );
Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more.
Sign Up for our weekly newsletter to get update about new content.