Write a Fibonacci Series program in C language
The Fibonacci sequence is a set of steadily increasing integer numbers where each number is equal to the sum of the past two numbers. Iinital first two numbers of the Fibonacci sequence are 0 followed by 1.fibonacci.c
1 #include <stdio.h>
2 int main() {
3 int i=0,j=0,k,c,n;
4 printf("Enter the number of terms: ");
5 scanf("%d",&n);
6 for(c = 1;c <= n;c++) {
7 k = i+j;
8 printf("%d ",k);
9 if(j == 0) {
10 if(n > 1) {
11 k = 1;
12 printf("%d ",k);
13 c++;
14 }
15 }
16 i = j;
17 j = k;
18 }
19 printf("\n");
20 return 0;
21 }