Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a=0,b=1,c,n,i;
- scanf("%d",&n);
- printf("%d %d",a,b);
- for(i=0;i<=n;i++)
- {
- c=a+b;
- a=b;
- b=c;
- printf(" %d",c);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement