Showing posts with label WAP to print fabbonic series from 1 to 55. Show all posts
Showing posts with label WAP to print fabbonic series from 1 to 55. Show all posts

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 ();

}


Labels