华为机试:字符串反转
#include <iostream> #include <iterator> #include <string> #include <algorithm> using namespace std; int main() { // int a, b; // while (cin >> a >> b) { // 注意 while 处理多个 case // cout << a + b << endl; // } string str; cin >> str; reverse(str.begin(), str.end()); cout << str << endl; }