fork download
  1. #include <cstdlib>
  2. #include <string>
  3. #include <iostream>
  4. #include <algorithm>
  5.  
  6. int main()
  7. {
  8. std::string input;
  9.  
  10. while( std::getline( std::cin, input ) ) {
  11. std::replace( input.begin(), input.end(), ',', ';');
  12. std::replace( input.begin() + 10, input.end(), '.', ',');
  13. std::cout << input << '\n';
  14. }
  15.  
  16. return EXIT_SUCCESS;
  17. }
  18.  
Success #stdin #stdout 0s 2988KB
stdin
27.09.2012,15:30:17,12.562,3.231
27.09.2012,15:30:17,12.125,3.144
27.09.2012,15:30:17,12.767,3.145
27.09.2012,15:30:18,12.660,3.260
stdout
27.09.2012;15:30:17;12,562;3,231
27.09.2012;15:30:17;12,125;3,144
27.09.2012;15:30:17;12,767;3,145
27.09.2012;15:30:18;12,660;3,260