fork download
  1. #include <sstream>
  2. #include <string>
  3. #include <fstream>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. string line;
  11. istringstream strm;
  12. int num;
  13. while (getline(cin, line))
  14. {
  15. istringstream strm(line);
  16. while ( strm >> num )
  17. cout << num << " ";
  18. cout << "\n";
  19. }
  20. }
  21.  
Success #stdin #stdout 0s 3280KB
stdin
1 2 3 4 5 6 7
10 20 30 40 50 60 70
100 200 300 400 500 600 700
stdout
1 2 3 4 5 6 7 
10 20 30 40 50 60 70 
100 200 300 400 500 600 700