#include
void main()
{
long int lno,p=1,q=1,i,r=0;
printf("enter the no. of fibonacci series: ");
scanf("%ld",&lno);
printf("%ld\n",p);
printf("%ld\n",q);
for(i=1;i<=lno;i++)
{
r=p+q;
printf("%ld\n",r);
p=q;
q=r;
}
getch();
}
My Tricky World Based on the world of all types of Tips, Tricks, Hacks, Fun, Amazing Images, Knowledges, Interesting Thinking and Many More...........
No comments:
Post a Comment