Advertisement
Liliana797979

Viarni reshenia

Nov 27th, 2020
120
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);
  17.  
  18. function easterLunch(arg1, arg2, arg3) {
  19.     let cakesCount = Number(arg1);
  20.     let eggsCount = Number(arg2);
  21.     let cookies = Number(arg3);
  22.  
  23.     let cakesPrice = cakesCount * 3.20;
  24.     let eggsPrice = eggsCount * 4.35;
  25.     let cookiesPrice = cookies * 5.40;
  26.     let eggPaintPrice = eggsCount * 12 * 0.15;
  27.     let totalCost = cakesPrice + eggsPrice + cookiesPrice + eggPaintPrice;
  28.  
  29.     console.log(totalCost.toFixed(2));
  30. }
  31.  
  32. easterLunch(3, 2, 3);
  33.  
  34.  
  35. function calculatorDepoziti(arg1, arg2, arg3) {
  36.     let depositedAmount = Number(arg1);
  37.     let termOfTheDeposit = Number(arg2);
  38.     let annualInterestRate = Number(arg3);
  39.  
  40.     let interest = depositedAmount * (annualInterestRate / 100);
  41.     let monthlyInterest = interest / 12;
  42.     let totalSum = depositedAmount + termOfTheDeposit * monthlyInterest;
  43.  
  44.     console.log(totalSum.toFixed(2));
  45. }
  46.  
  47. calculatorDepoziti("200",
  48. "3",
  49. "5.7");
  50.  
  51.  
  52. function company(arg1, arg2, arg3, arg4, arg5) {
  53.     let daysCount = Number(arg1);
  54.     let confectionersCount = Number(arg2);
  55.     let cakesCount = Number(arg3);
  56.     let wafflesCount = Number(arg4);
  57.     let pancakesCount = Number(arg5);
  58.  
  59.     let cakes = cakesCount * 45;
  60.     let waffles = wafflesCount * 5.8;
  61.     let pancakes = pancakesCount * 3.2;
  62.     let sumForDay = (pancakes + waffles + cakes) * confectionersCount;
  63.     let totalMoney = sumForDay * daysCount;
  64.     let money = totalMoney - (1 * totalMoney) / 8;
  65.  
  66.     console.log(money);
  67. }
  68.  
  69. company("23",
  70. "8",
  71. "14",
  72. "30",
  73. "16");
  74.  
  75.  
  76.  
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement