technicalsymposium


Free E-Mail Alerts

Software Programs Codings-Free Download

C Program For FIBANACCI SERIES USING RECURSION.

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
clrscr();
printf("Enter the n value:");
scanf("%d",&n);
printf("the fibinacci series is\n");
for(i=0;i<n;i++)
{
printf("%d\n",fib(i));
}
getch();
}
int fib(int n)
{
if(n==0)
{
return(0);
}
if(n==1)
{
return(1);
}
else
{
return(fib(n-1)+fib(n-2));
}
}

Technicalsymposium.com- All Information Contents Given Below-Click & Get All Details