THE 'C'- ARCHIE STYLE...
Thursday, March 31, 2011
Fibonacci Series
void main()
{
int a=0,b=1,c=1,i,l;
clrscr();
printf("enter the limit");
scanf("%d",&l);
printf("%d %d",a,b);
for(i=2;i<l;i++)
{
c=a+b;
a=b;
b=c;
printf(" %d",c);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment