Generate Fibonacci Series Using Recursive Function In C Programming Tamil


#include<stdio.h>
#include<conio.h>
void fib(int,int,int);
void main()
{
	int n,a=-1,b=1;
	clrscr();
	printf("\nEnter the limit: ");
	scanf("%d",&n);
	fib(n,a,b);
	getch();
}
void fib(int n,int a,int b)
{
       int c;
       c=a+b;
       printf("\n%d",c);
       a=b;
       b=c;
       if(n>1)
       {
		fib(n-1,a,b);
       }
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming