首页 > 代码库 > leetcode reverse integer

leetcode reverse integer

public class Solution {
public int reverse(int x) {
int ret=0;
while(x!=0)
{
int t=x%10;
ret=ret*10+t;
x=x/10;


}


return ret;

}
}