fork download
  1. #include <iostream>
  2. #include<cctype>
  3. #include<iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7. string s = "good morning!";
  8. string c(s.length(),' ');
  9. for (int i = s.length()-1;i>=0;i--){
  10. c[i] = s[s.length()-1-i];
  11. //cout<<c;
  12. }
  13. cout<<c;
  14. return 0;
  15. }
Success #stdin #stdout 0s 5264KB
stdin
Standard input is empty
stdout
!gninrom doog