fork download
  1. #include <iostream>
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s = "Hello World";
  7.  
  8. // Using reverse() function to reverse s
  9. reverse(s.begin(), s.end());
  10.  
  11. cout << s;
  12. return 0;
  13. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
dlroW olleH