fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string st="Hello, world!", s, t;
  7. cout<<st<<endl;
  8.  
  9. for (int i=0; i<st.length(); i--)
  10. cout<<st[i]<<" ";
  11. cout<<endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 4964KB
stdin
Standard input is empty
stdout
Hello, world!
H