//Develop a ‘C’ program to print first ‘n’ terms of the Fibonacci series
#include<stdio.h>
int main()
{
int a,b,c,i;
a=-1;
b=1;
printf("\n\t\t ‘C’ program to print first ‘n’ terms of the Fibonacci series");
printf("\n Enter the terms till series has to be generated=");
int n;
scanf("%d",&n);
printf("\n The Fibonacci Series \n");
for(i=0;i<n;i++)
{
c=a+b;
a=b;
b=c;
printf("%d\n",c);
}
return 0;
}

### Like this:

Like Loading...

*Related*

[…] write a c program for Fibonacci series […]