大家好,你能帮我计算步数吗?在此处输入图像描述
function getPlan(currentProduction, months, percent) {
// write code here
let sum = 0;
for(let i = 0; i < months; i++){
let workCalculate = currentProduction * percent / 100;
sum *= workCalculate;
}
return Math.floor(sum);
}
示例:getPlan(1000, 6, 30) === [1300, 1690, 2197, 2856, 3712, 4825] getPlan(500, 3, 50) === [750, 1125, 1687]
隔江千里
慕慕森
森栏
相关分类