Tuesday, January 4, 2011

FABBONIC SERIES

WAP TO PRINT FABBONIC SERIES FROM 1 TO 55
void main ()
{
int a,b,c;
clrscr ();
a=0;b=1;c=1;
printf ("%d\n%d",a,b);
while (c<55)
{
c=a+b;
printf ("\n%d",c);
a=b;
b=c;
}
getch ();
}


No comments:

Post a Comment