Generation Next Technology
Every student can learn, just not on the same day, or the same way
Saturday, April 11, 2009
PROG:- Fibbnocci Series
#include
#include
void main()
{
int c,p=1,x=1,max;
clrscr();
printf("enter max. value");
scanf("%d",&max);
printf ("%d%d",p,x);
while(max>x)
{
c=p+x;
x=p;
p=c;
printf("%d, ",c);
}
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Search This Blog
No comments:
Post a Comment