C Program to Implement Fibonacci Series
This is the C Program which Implements Fibonacci series upto user defined limit n

[cc lang=”c”]
#include
int main()
{
int n; //Variable to store no of terms
int first=0; //First term initializing with zero as value
int second=1; //second term initializing with one as its value
int next; //used to store the next value of series by summing up previous terms
int i; //condition initialisor
printf(“Enter the number of termsn”);
scanf(“%d”,&n); //accepting value for variable n
printf(“First %d terms of fibonacci series are :-n”,n);
for (i=0;i
main()
{
long num;
printf(“Enter Number of terms n”);
scanf(“%ld”,&num);
long i=0;
long firstterm=0;
long secterm=1;
long nexterm;
while(i
Recent Comments