Professional Documents
Culture Documents
/* Febinocii Series */
#include<stdio.h>
#include<conio.h>
int f,s,t,c,n;
main()
{clrscr();
puts("FEBINOCII SERIES");
puts("Enter how many number of febinocii numbers you want");
scanf("%d",&n);
f=0;
s=1;c=2;
printf(" 0 1 ");
do{ t=f+s;++c;
if(c>n) break;
printf("%d ",t);
f=s;
s=t;
}while(1);
getch();
}
Program 1c:
Output:
Program 2a:
#include<stdio.h>
float t,s;
int i,x,n,k;