Advertisement
sheredega

task 14

Nov 4th, 2022
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n;
  9.     int first = 2;
  10.     for (int i = 0; i < n; i++) {
  11.         cout << first << " ";
  12.         first += 2;
  13.     }
  14.  
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement