fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n;
  7. std::vector<int> numbers;
  8. cin >> n;
  9. for(int i=0;i<n;++i)
  10. {
  11. int no;
  12. cin >> no;
  13. numbers.push_back(no);
  14. }
  15. for (auto i : numbers)
  16. cout << i << " ";
  17. return 0;
  18. }
Success #stdin #stdout 0s 15240KB
stdin
5
1 2 31 4 5
stdout
1 2 31 4 5