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