Printing Fibonacci Series in C Program Tamil


// fibonacci series
// 0 1 1 2 3 5....
//using recursive function
#include<stdio.h>
#include<conio.h>
void fibo(int,int);
void main()
{
	int old=0,current=1;
	clrscr();	// www.tutorjoes.com
	printf("%d\t%d\t",old,current);
	fibo(old,current);	//function calling
	getch();
}
void fibo(int old,int current)
{
	static int terms=2;
	int new;
	if(terms<20)
	{
		new=old+current;
		printf("%d\t",new);
		terms=terms+1;
		fibo(current,new);
	}
	else         // www.tutorjoes.com
	{
		return;
	}
}

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