fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <sstream>
  4.  
  5. int main()
  6. {
  7. std::string word, sentence;
  8. std::getline(std::cin,sentence);
  9. std::istringstream ss(sentence);
  10. ss >> word >> std::ws;
  11. std::getline(ss, sentence);
  12. sentence += ' ' + word;
  13. std::cout << sentence << std::endl;
  14. }
Success #stdin #stdout 0s 3476KB
stdin
MAC101 is the class
stdout
is the class MAC101