Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function calculation(arg1, arg2, arg3, arg4, arg5) {
- let brPrice = Number(arg1);
- let brKg = Number(arg2);
- let zKg = Number(arg3);
- let eggK = Number(arg4);
- let maPac = Number(arg5);
- let zPrice = (brPrice - 0.25 * brPrice);
- let eggPrice = (brPrice + 0.1 * brPrice);
- let maPrice = (zPrice - 0.8 * zPrice);
- console.log(brPrice * brKg + zPrice * zKg + eggPrice * eggK + maPrice * maPac).toFixed(2));
- }
- calculation(63.44, 3.57, 6.35, 8, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement