MeehoweCK

Untitled

Oct 21st, 2020
467
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n;
  9.  
  10.     int a = 1, b = 0, c;
  11.  
  12.     for(int i = 0; i < n; ++i)
  13.     {
  14.         cout << a << endl;
  15.         c = b;
  16.         b = a;
  17.         a = b + c;
  18.     }
  19.     return 0;
  20. }
RAW Paste Data