fork download
  1. #include <vector>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. void print_out(vector<int> numbers)
  7. {
  8.  
  9. cout << "------------- PRINT START -------------" << endl;
  10.  
  11. for( auto i: numbers )
  12. cout << i << endl;
  13.  
  14. cout << "------------- PRINT END -------------" << endl;
  15. }
  16.  
  17. vector<int> beautify(vector<string> numbers)
  18. {
  19. vector<int> result;
  20. for (auto & i : numbers)
  21. result.push_back(std::stoi(i));
  22. return result;
  23. }
  24.  
  25. int main()
  26. {
  27.  
  28. vector<string> test1;
  29. test1.push_back("316713");
  30. test1.push_back("329893");
  31. test1.push_back("2138");
  32.  
  33. print_out(beautify(test1));
  34. return 0;
  35. }
Success #stdin #stdout 0s 3232KB
stdin
Standard input is empty
stdout
------------- PRINT START -------------
316713
329893
2138
------------- PRINT END -------------