#include<stdio.h>
#include<conio.h>
int main(void)
{
int n,a=0,b=1,c=0,i=1;
printf("How Mnay First Fibonacci Numbers you Want To Generate?\t\t");
scanf("%d",&n);
printf("%d %d",a,b);
while(i<=n-2)
{
c=a+b;
printf("%d",c);
a=b;
b=c;
i++;
}
getch();
return 0;
}
No comments:
Post a Comment