题解 | #字符逆序#
字符逆序
http://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
#include<iostream>
#include<stack>
using namespace std;
int main()
{
string str;
while(getline(cin,str))
{
string res;
int i=str.length()-1;
while(i>=0)
{
res.push_back(str[i--]);
}
cout<<res<<endl;
}
return 0;
}