昵称是啥?? @ 2017-07-15 11:33:14
//数字反转 ,自己编译运行是可以的
#include<iostream>
using namespace std;
int main()
{
int m,n,a,b,c;
cin>>m;
if(m>=0)
{
a=m/100;
b=m/10%10;
c=m%10;
cout<<c*100+b*10+a<<endl;
}
else
{
a=-m/100;
b=-m/10%10;
c=-m%10;
cout<<-(c*100+b*10+a)<<endl;
}
return 0;
}
by SW_Wind @ 2017-07-15 13:15:51
你没看数据范围
by 昵称是啥?? @ 2017-07-15 16:57:32
@SW_Wind 谢谢,是自己粗心了