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