fork download
  1. #include <string>
  2. #include <iostream>
  3. #include <iterator>
  4. #include <algorithm>
  5. #include <cctype>
  6.  
  7. inline void f(char &c) {
  8. c = toupper(c);
  9. }
  10.  
  11. int main() {
  12. std::string col("maly tekst");
  13.  
  14. std::for_each(col.begin(), col.end(), f);
  15. std::copy(col.rbegin(), col.rend(), std::ostream_iterator<char>(std::cout));
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 2856KB
stdin
Standard input is empty
stdout
TSKET YLAM