fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <iterator>
  4. #include <string>
  5.  
  6. int main() {
  7.  
  8. std::string s;
  9.  
  10. std::getline(std::cin, s);
  11.  
  12. std::copy(s.rbegin(), s.rend(), std::ostream_iterator<char>(std::cout, ""));
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5288KB
stdin
ala ma kota
stdout
atok am ala