#include <stdio.h>
int main()
{
int i, n, firstTerm=0, secondTerm=1, sum=0;
printf("\nEnter number of terms required in Fibonacci Series: ");
scanf("%d",&n);
// Showing the first two term of the Fibonacci Series
printf("\nFibonacci Series is:\n\n\n %d %d ", firstTerm, secondTerm);
//start i =2
i=2;
//i starts from 2, as the first two terms of the series have already been shown
while (i<n)
{
sum=firstTerm+secondTerm;
firstTerm=secondTerm;
secondTerm=sum;
++i;
printf("%d ",sum);
}
return 0;
}