Program for FIBANOCHI


Program for FIBANOCHI
#include<stdio.h>
#include<conio.h>
main()
{
int a,i=0,f0=0,f1=1,f;
clrscr();
printf("enter the value of a");
scanf("%d",&a);
printf("%d\n",f0);
printf("%d\n",f1);
do
{       f=f0+f1;


printf("%d\n",f);
f0=f1;
f1=f;
i++;
}while(i<a-1);
getch();
}




No comments:

Post a Comment