Advertisement
Liliana797979

preparation christmas

Nov 26th, 2020
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function christmasPreparation() {
  2.     let rollsOfPaper = Number(arg1);
  3.     let rollsOfCloth = Number(arg2);
  4.     let littersOfGlue = Number(arg3);
  5.     let totalSum = Number(arg4);
  6.     let sum = Number(arg5);
  7.     let percent = 25;
  8.  
  9.     let paperPrice = rollsOfPaper * 5.80;
  10.     let clothPrice = rollsOfCloth * 7.20;
  11.     let gluePrice = littersOfGlue * 1.20;
  12.     totalSum = paperPrice + clothPrice + gluePrice;
  13.     sum = totalSum - (percent / 100);
  14.  
  15.     console.log(`${sum.toFixed(3)}`);
  16. }
  17.  
  18. christmasPreparation(4, 2, 5, 13);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement