题目链接题源浙大版《C语言程序设计(第3版)》题目集
code
int reverse( int number ){
int flag=1,sum=0,t;
if(number<0){
flag=-1;
number=-number;
}
while(number>0){
t=number%10;
sum=sum*10+t;
number/=10;
}
sum*=flag;
return sum;
}