Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void){
  5.  
  6. int n1, n2, t, N, i;
  7.  
  8. scanf("%d", &N);
  9. N -= 2;
  10.  
  11. n1 = 1;
  12. n2 = 1;
  13. printf("%d\n%d\n", n1, n2);
  14.  
  15. for(i=0; i<N; i++){
  16.  
  17. t=n1+n2;
  18. printf("%d\n",t);
  19. n2=n1;
  20. n1=t;
  21.  
  22.  
  23. }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement