Liliana797979

christmas preparation

Nov 23rd, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function christmasPreparation() {
  2.     let rollsOfPaper = Number(arguments[0]);
  3.     let rollsOfCloth = Number(arguments[1]);
  4.     let littersOfGlue = Number(arguments[2]);
  5.     let totalSum = Number(arguments[3]);
  6.     let sum = Number(arguments[4]);
  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. }
Advertisement
Add Comment
Please, Sign In to add comment