Saturday, August 29, 2009

C++-FIBONACCI SERIES

#include
#include

main()
{
const unsigned long limit=4294967295;
unsigned long next=0;
unsigned long last=1;
long sum;

clrscr();

cout<<"\n\n This program will print the Fibonacci series :\n\n ";
while(next {
cout< sum=next+last;
next=last;
last=sum;
}
getch();
}

0 comments:

Post a Comment

Followers