C Programming
Computer Programming

Program in c to Display Fibonacci Series



Write a Program in c to Display Fibonacci Series

\* C Program to to Display Fibonacci Series *\

# include < stdio.h >
int   main( )
{

int   n, t1, t2, t, temp, i  ;
printf(" Enter the Number of Fibonacii Terms : ") ;
scanf("%d ", & n) ;
t1 = 0 ;
t2 = 1 ;
printf("\n Fibonacii Series are : ") ;
printf("\n %d \n %d", t1, t2) ;
i = 3 ;
while (   i   <=   3
{

t = t1 + t2 ;
printf("\n %d ", t) ;
t1 = t2 ;
t2 = t ;
i++ ;

}
return ( 0 ) ;

}

Output of Program :

Output of Program in C to Display Fibonacci Series