fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. int main ()
  5. {
  6. std::vector<int> tab;
  7. int x = 0;
  8. while(std::cin >> x) {
  9. tab.push_back(x);
  10. }
  11.  
  12. for(auto e : tab) {
  13. std::cout << e << ", ";
  14. }
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 3432KB
stdin
-3
-10000
1
-3
2
333
-10
a
stdout
-3, -10000, 1, -3, 2, 333, -10,