fork download
  1. #include <string>
  2. #include <iostream>
  3.  
  4. void iterateBackwards(){
  5. std::string hiThere = "dlrow olleh";
  6. for ( int i = hiThere.length() - 1; i >= 0; i--) {
  7. std::cout << hiThere[i];
  8. }
  9. }
  10.  
  11. int main()
  12. {
  13. iterateBackwards();
  14. }
  15.  
Success #stdin #stdout 0s 2984KB
stdin
Standard input is empty
stdout
hello world