You are viewing a single comment's thread. Return to all comments →
JavaScript Code of Day 3
function solve(meal_cost, tip_percent, tax_percent) { // Write your code here
let tip= (meal_cost/100) * tip_percent; let tax= (tax_percent/100) * meal_cost;
let total_cost = Math.round(meal_cost + tip+ tax); console.log(total_cost);
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
JavaScript Code of Day 3
function solve(meal_cost, tip_percent, tax_percent) { // Write your code here
let tip= (meal_cost/100) * tip_percent; let tax= (tax_percent/100) * meal_cost;
let total_cost = Math.round(meal_cost + tip+ tax); console.log(total_cost);