fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main(int argc, char** argv) {
  6. std::vector<std::string> course;
  7. std::string line;
  8.  
  9. while (std::getline(std::cin, line)) {
  10. course.push_back(line);
  11. }
  12.  
  13. for (std::size_t i = 0; i < course.size(); i++) {
  14. for (std::size_t j = 0; j < course[i].size(); j++) {
  15. std::cout << course[i][j];
  16. }
  17. std::cout << '\n';
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 16064KB
stdin
xxxxxxxxxxxx
xxx   yyyxxx
xxxXXYYxxyyy
stdout
xxxxxxxxxxxx
xxx   yyyxxx
xxxXXYYxxyyy