题目如下:
代码如下
#include<iostream>
using namespace std;
int main()
{
int a;
while (cin >> a)
{
if(a>-2147483648&&a<2147483647)
{
int c = 0,b=0;
for (int i = 1; ; i++)
{
if (a != 0)
{
c = a % 10;
b = b*10+c;
a = a / 10;
}
else
break;
}
cout << b << endl;
}
else
cout << 0 << endl;
}
}
错误如下