Search (Article Or Program)

18 June 2011

Fibonacci

#include
#include
main()
{
clrscr();
printf("\t\t\t>>>>>>>>>>>>>>FIBONACCI SERIES<<<<<<<<<<<<<<\n\n");
int s,t,m=0,n=1,c=1;
printf("Enter a No.");
scanf("%d",&t);
while(c!=t)
{
printf("%d\n",n);
s=m+n;
c=c+1;
m=n;
n=s;
}
printf("%d",n);
getch();
}