Write a program to find the Fibonacci series using recursive function

//this is a program to find the fibbonaccies series using the recursive function
#include<stdio.h>
#include<conio.h>
int fibbo(int n);
void main()
{
int i,num;

printf("\n\nEnter the number of terms: ");
scanf("%d",&num);

printf("\n\nThe Fibbonaccie series : \n\n");
for(i=0;i<num;i++)
{
printf(" %d ",fibbo(i));
}

getch();
}

int fibbo(int n)
{
int f;

if(n==0)
return 0;
if(n<=1)
return 1;
else
{
f=fibbo(n-1)+fibbo(n-2);
}


}


Previous
Next Post »