Program To Display Fibonocci Series
/* Program To Display Fibonocci Series 1 1 2 3 5 8 13 21 .... */ #include
#include
void main() { int a=1,b=1,n,c=0; clrscr(); printf("\nEnter a number\n\n"); scanf("%d",&n); printf("\nFibonocci series:\n\n %d\t%d",a,b); while(c<=n) { c = a+b; if(c<=n) printf("\t%d",c); a = b; b = c; } getch(); }
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/