解题思路:
注意事项:
参考代码:
#include<iostream>
using namespace std;
int main()
{
int num = 0;
cin >> num;
string str = to_string(num);
cout << str.length() << endl;
for(char c : str)
{
cout << c << " ";
}
cout << endl;
for(string::reverse_iterator it = str.rbegin(); it != str.rend(); ++it)
{
cout << *it;
}
return 0;
}
0.0分
0 人评分