What's New-Given Below
technicalsymposium
technicalsymposium
technicalsymposium

C/C++ Lab Program(s)/Materials

C Program For FIBANACCI SERIES USING RECURSION.

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
clrscr();
printf("Enter the n value:");
scanf("%d",&n);
printf("the fibinacci series is\n");
for(i=0;i<n;i++)
{
printf("%d\n",fib(i));
}
getch();
}
int fib(int n)
{
if(n==0)
{
return(0);
}
if(n==1)
{
return(1);
}
else
{
return(fib(n-1)+fib(n-2));
}
}

More Lab Programs with Answers -Given Below-Click and Get Freely

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com