Wednesday, 2 May 2012
Program Of Fibonacci Series In c
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c,i,n;
clrscr();
a=0;
b=1;
printf("Enter Limit=");
scanf(" %d",&n);
printf("%d",a);
printf(" %d",b);
for(i=0;i<n;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