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

Search This Blog