Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int f=0,s=1,i,j,next;
- printf("how many number you want to show : ");
- scanf("%d",&j);
- for(i=0; i<j; i++)
- {
- if(i<=1)
- {
- printf("%d ",i);
- }
- else
- {
- next=f+s;
- f=s;
- s=next;
- printf("%d ",next);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement