我想将结果四舍五入到小数点后两位。我已经尝试过 Math.floor*(Math.pow (1.02,7)*100)/100 但我得到的是 1,150 而不是 1,148.69 - 我打算返回的答案。
我的代码片段 atm:
function money (amount) {
return amount*(Math.pow (1.02,7))
}
money(1000);
慕姐8265434
撒科打诨
繁星淼淼
相关分类