Advertisement
Josif_tepe

Untitled

May 4th, 2025
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5.  
  6. int main() {
  7.     int n;
  8.     cin >> n;
  9.    
  10.     vector<int> v;
  11.     for(int i = 0; i < n; i++) {
  12.         int x;
  13.         cin >> x;
  14.        
  15.         v.push_back(x);
  16.     }
  17.    
  18.     for(int i = 0; i < v.size(); i++) {
  19.         cout << v[i] << " ";
  20.     }
  21.    
  22.     return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement