Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function christmasPreparation(arg1, arg2, arg3, arg4) {
- let rollsOfPaper = Number(arg1);
- let rollsOfCloth = Number(arg2);
- let littersOfGlue = Number(arg3);
- let percent = Number(arg4);
- let paperPrice = rollsOfPaper * 5.80;
- let clothPrice = rollsOfCloth * 7.20;
- let gluePrice = littersOfGlue * 1.20;
- totalSum = paperPrice + clothPrice + gluePrice;
- sum = totalSum - (percent / 100) * totalSum;
- console.log(sum.toFixed(3));
- }
- christmasPreparation(2, 3, 2.5, 25);
Advertisement
Add Comment
Please, Sign In to add comment