Saturday, 12 May 2018

Program to print 8 terms of Fibonacci series in c languages

/* program to fibo series */
# include <stdio.h>
void main ()
{
int counter = 0 ;
int a=0,b=1,sum ;
clrscr ()
printf ("\n %d",a) ;
printf ("\n%d",b) ;
while ( counter<6 )
{
sum =a+b ;
printf ("\n %d",sum) ;
a=b ;
b=sum ;
counter++ ;
}
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...