void main()
Author: Sanif S S
Site: theeduzone.blogspot.com
Email: sanifss@gmail.com
#include<stdio.h>
#include<conio.h>
{
clrscr();
int n,i=1,f1=0,f2=1,f3;
printf("enter a number\n");
scanf("%d",&n);
printf("fibonacci series of%d numbers",n);
while(i<=n)
{
printf("\n%d",f1);
f3=f1+f2;
f1=f2;
f2=f3;
i++;
}
getch();
}
No comments:
Post a Comment