题解 | #字符逆序#
字符逆序
http://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main() {
string a;
while(getline(cin,a))
{
reverse(a.begin(),a.end());
cout<<a;
}
return 0;
}
#include <algorithm>
#include <string>
using namespace std;
int main() {
string a;
while(getline(cin,a))
{
reverse(a.begin(),a.end());
cout<<a;
}
return 0;
}