fork(6) download
  1. #include <iostream>
  2. #include <vector>
  3. #include <iterator>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. vector<double> values((istream_iterator<double>(cin)),
  10. istream_iterator<double>());
  11.  
  12. // синтаксис C++11, поменяйте, если у вас не компилируется
  13. for (auto v : values)
  14. cout << v << endl;
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 3032KB
stdin
1.1 2.2 3.3
4.4
5.5 6 7 8 9
10 11
12
stdout
1.1
2.2
3.3
4.4
5.5
6
7
8
9
10
11
12