This program accepts n as input and finds ** first n fibbonaci
numbers **.The function fibo is called recursively to print the
next number in the series.

Fibonacci series begins with 0.The number next to 0 is 1.These two numbers are added to get the third number.Suppose we want fibbonaci series of 5 numbers then it will be calculated as-

-0 will be first number.

-1 will be second number.

-1 will be third number obtained by adding first and second number i.e. 0 + 1.

-2 will be fourth number obtained by adding second and third number i.e. 1 + 1.

-3 will be fifth number obtained by adding third and fourth number i.e. 1 + 2.

#include < stdio.h > #include < conio.h > int fibo(int i,int j,int f,int s); void main() { int i,j,f,s,t,no,n; clrscr(); printf("Enter the number\n"); scanf("%d",&n); f=0;s=1;j=3; for(i=1;i<=n;i++) { no=fibo(i,j,f,s); printf("\n %d",no); } }//main int fibo(int i,int j,int f,int s) { int t; if (i==1) return(0); else if (i==2) return(1); else { if(j<=i) { t=f+s; f=s; s=t; j++; return (fibo(i,j,f,s)); } } //else return(s); }//fibbo } // main