Liliana797979

christmas preparation - viarno reshenie

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