In this tutorial you will learn about program for fibonacci series in c.

Fibonacci series is a sequence of numbers in which next number in the sequence is obtained by adding previous two numbers. For example 0, 1, 1, 2, 3, 5, 8, 13.

Below I have shared C program to implement it.

## Program for Fibonacci Series in C

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include<stdio.h> int main() { int first=0,second=1,third,i,n; printf("Enter how many elements?"); scanf("%d",&n); printf("\n%d %d",first,second); for(i=2;i<n;++i) { third=first+second; printf(" %d",third); first=second; second=third; } return 0; } |

itz really useful…..

thanks a lot!

sir can you tell me the logic of the this Fibonacci series : 1 2 3 5 6 8 10

means the missing is 4 7 9 numbers

I get full .arms in exams due to it thanks a lot

Explain this logic

explain its logic