数字反转的数学方法

//pop operation:
pop = x % 10;
x /= 10;

//push operation:
temp = rev * 10 + pop;
rev = temp;

你可能感兴趣的:(数字反转的数学方法)