Saturday, 30 August 2014

C PROGRAM ON FIBONACCI SERIES

C PROGRAM ON FIBONACCI SERIES


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,i,n;
clrscr();
printf("<=fibonacie series to find the numbers between 1 to n series=>");
printf("\n\n\n\t\t\t enter the size(n):",n);
scanf("%d",&n);
printf("\n\n\t\t\t<........fibonacie series.........>",n);
printf("\n\n %d%d",n);
for(i=0;i<=n-2;i++)
{
c=a+b;
printf("  ");
a=b;
b=c;
}
getch();
}

No comments: