Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function suppliesForSchool(input) {
- let pens = Number(input[0]);
- let markers = Number(input[1]);
- let liters = Number(input[2]);
- let discount = Number(input[3]);
- let finalPriceForPens = pens * 5.80;
- let finalPriceForMarkers = markers * 7.20;
- let finalPriceForLiquid = liters * 1.20;
- let finalPrice = finalPriceForPens + finalPriceForMarkers + finalPriceForLiquid;
- let priceWithDiscount = discount / 100;
- let total = finalPrice - (finalPrice * priceWithDiscount);
- console.log(total);
- }
Advertisement
Add Comment
Please, Sign In to add comment