生成一個(gè)數(shù)字的翻轉(zhuǎn)數(shù)
function generateReverseNum(num) {
let rev = 0;
let n = num;
while(n > 0) {
rev = 10 * rev + n % 10;
n = Math.floor(n/10)
}
return rev;
}
function generateReverseNum(num) {
let rev = 0;
let n = num;
while(n > 0) {
rev = 10 * rev + n % 10;
n = Math.floor(n/10)
}
return rev;
}