#include<iostream> #include<string> using namespace std;

void Inverted(string&s); void main() {  string s;  cin >> s;  string &p = s;

 Inverted(p);  cout << s << endl;  system("pause"); } void Inverted(string& s) {  int i = 0;      while (s[i] != '\0')  {   i++;     }  i--;  for (int j = 0; j <= i; j++)  {   char temp;   temp = s[j];   s[j] = s[i];   s[i] = temp;     i--;  }

}

posted on 2018-08-03 14:18  幽love梦费重寻  阅读(115)  评论(0)    收藏  举报