We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 2: Operators
Day 2: Operators
Sort by
recency
|
3393 Discussions
|
Please Login in order to post a comment
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);
C# code: double usertips =meal_cost /100.0 * tip_percent; double usertax = tax_percent/100.0 * meal_cost;