📌  相关文章
📜  Day 2: 运营商30天hackerrank解决方案代码教程javascript代码示例

📅  最后修改于: 2022-03-11 15:03:40.307000             🧑  作者: Mango

代码示例1
// Day 2: Operators 30 days of code tutorial in hackerrank solutions javascript
function solve(meal_cost, tip_percent, tax_percent) {
    // Write your code here
    let tip = (tip_percent/100)* meal_cost;
    let tax = (tax_percent/100) * meal_cost;
    let totalSum = meal_cost + tip + tax;
    console.log(Math.round(totalSum));
}
solve(12.00, 20, 8);