#include<stdio.h>
#include<conio.h>
void main()
{ int n=0,i=3,f1,f2,f3;
clrscr();
printf("enter how many nos. u want to enter\n");
scanf("%d",&n);
f1=0;
f2=1;
printf("%d%d",f1,f2);
do
{
f3=f2+f1;
f1=f2;
f2=f3;
i++;
printf("%d",f3);
}
while(i<=n);
}
Output:-
enter how many nos. u want to enter
6
011235
No comments:
Post a Comment