#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
for(int i = s.length() - 1; i >= 0; i--){
cout << s[i];
}
cout << endl;
return 0;
}
字符串倒序输出
最新推荐文章于 2023-10-25 20:34:30 发布
#include <iostream>
#include <string>
using namespace std;
int main(){
string s;
cin >> s;
for(int i = s.length() - 1; i >= 0; i--){
cout << s[i];
}
cout << endl;
return 0;
}