Josif_tepe

Untitled

Feb 9th, 2026
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.     int F = 1;
  7.     int S = 1;
  8.    
  9.    
  10.     cout << F << " " << S << " ";
  11.     while(F <= 30) {
  12.         int T = F + S;
  13.        
  14.         cout << T << " ";
  15.          
  16.         F = S;
  17.         S = T;
  18.        
  19.     }
  20.    
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment