#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--; }
}

浙公网安备 33010602011771号