c/c++反转字符
string word; cin >> word; //下标
int i, j;
// 临时字符 char temp; for (j = 0,i = word.size()-1;j<i;j++,i-- ) { //设置temp为最后一个字符 temp = word[i]; word[i] = word[j]; word[j] = temp; }
void reverseSentence() { char c; c = getchar(); if (c != '\n') { reverseSentence(); cout<<c; }
自以为穿越黑暗森林,而猜疑,终究坚不可摧。

浙公网安备 33010602011771号