Subscribe to Feeds

Send Your Projects To georgepj@hotmail.com

We'll Publish It With Your Name :-)

Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]

Fibonacci using recursive Function

Click Here To Download C File Of This Program

 //Generate Fibonacci Series  
//Downloaded from www.c4cprog.co.nr
#include<conio.h>
int a=0,b=1,s=0,c=0;
void fibo(int l)
{
printf("%d ",a);
c=a+b;
a=b;
b=c;
s++;
if(s!=l)
fibo(l);
}
void main()
{
int l;
clrscr();
printf("Enter Limit : ");
scanf("%d",&l);
printf("\n\nFibonacci Series :\n\n");
fibo(l);
getch();
}

0 comments:

Post a Comment