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