fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4.  
  5. int main() {
  6. std::string inputString;
  7. std::cout << "abCdE ";
  8. std::getline(std::cin, inputString);
  9. std::reverse(inputString.begin(), inputString.end());
  10. std::cout << "EdCba " << inputString << std::endl;
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
abCdE EdCba