Guest User

PB - Easter Bakery

a guest
Apr 20th, 2020
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function calculation(arg1, arg2, arg3, arg4, arg5) {
  2.     let brPrice = Number(arg1);
  3.     let brKg = Number(arg2);
  4.     let zKg = Number(arg3);
  5.     let eggK = Number(arg4);
  6.     let maPac = Number(arg5);
  7.  
  8.     let zPrice = (brPrice - 0.25 * brPrice);
  9.     let eggPrice = (brPrice + 0.1 * brPrice);
  10.     let maPrice = (zPrice - 0.8 * zPrice);
  11.     console.log(brPrice * brKg + zPrice * zKg + eggPrice * eggK + maPrice * maPac).toFixed(2));
  12. }
  13.  
  14. calculation(63.44, 3.57, 6.35, 8, 2)
RAW Paste Data