Liliana797979

company

Nov 27th, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function company(arg1, arg2, arg3, arg4, arg5) {
  2.     let daysCount = Number(arg1);
  3.     let confectionersCount = Number(arg2);
  4.     let cakesCount = Number(arg3);
  5.     let wafflesCount = Number(arg4);
  6.     let pancakesCount = Number(arg5);
  7.  
  8.     let cakes = cakesCount * 45;
  9.     let waffles = wafflesCount * 5.8;
  10.     let pancakes = pancakesCount * 3.2;
  11.     let sumForDay = (pancakes + waffles + cakes) * confectionersCount;
  12.     let totalMoney = sumForDay * daysCount;
  13.     let money = totalMoney - (1 * totalMoney) / 8;
  14.  
  15.     console.log(money);
  16. }
  17.  
  18. company("23",
  19. "8",
  20. "14",
  21. "30",
  22. "16");
Advertisement
Add Comment
Please, Sign In to add comment