HJ11 数字颠倒(c++)
作者:互联网
题目链接:数字颠倒_牛客题霸_牛客网
注意点:
reverse() 字符串反转函数,头文件algorithm
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string str;
getline(cin,str);
reverse(str.begin(),str.end());
cout << str <<endl;
return 0;
}
标签:HJ11,reverse,int,c++,颠倒,str,include,数字 来源: https://blog.csdn.net/pure_dreams/article/details/123611026