A program that finds the Fibonacci series for first 30 numbers.
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- long long int i,f1,f2,f;
- clrscr();
- f1=0;f2=1;
- printf("\n\n%llu %llu",f1,f2);
- f=0;
- for(i=3;i<=30;i++){
- f=f1+f2;
- printf(" %llu ",f);
- f1=f2; f2=f;
- }
- getch();
No comments:
Post a Comment