C Program to find Fibonacci series using recursion

#include<stdio.h>
#include<conio.h>
void fb(int,int);
void main()
{
int f=0,s=1;
clrscr();
printf("Fibonacci series is:- \n");
printf("%d \t %d\t",f,s);
fb(f,s) ;
getch();
}
void fb(int f,int s)
{
int t;
t=f+s;
printf("%d \t",t);
if(t<5)
{
 fb(s,t);
}
}

OUTPUT:-

fibonacci

3 comments on “C Program to find Fibonacci series using recursion

  1. Heike

    Very great post. I simply stumbled upon your weblog and wanted to say that I’ve truly loved browsing your blog
    posts. In any case I will be subscribing on your feed
    and I am hoping you write once more very soon!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *