Wednesday, April 18, 2012

Program in C for Fibonacci Series



/*****<soeasyprograms.blogspot.in>*****/
#include<stdio.h>
#include<conio.h>
void main(void)
{
int i,j,k,n;
clrscr();
i=0;
j=1;
printf("%d %d

",i,j);
for(n=0;n<=5;n++)
{
k=i+j;
i=j;
j=k;
printf("%d ",k);
}
getch();
}
Dont forget to give your comments
Output of this Program is:


No comments:

Post a Comment