Program to print the fibbonacci series by using recursion..

program:-

#include<stdio.h>
int fib(int n)
{
if(n==1||n==2)
return 1;
return (fib(n1)+fib(n2));
}
void main()
{
int n,i;
printf(“Enter number of term in fibbo series”);
scanf(“%d”,&n);
for(i=1;i<=n;i++)
{
printf(“%d “,fib(i));
}
}


Leave a Reply

Your email address will not be published.