Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function company(arg1, arg2, arg3, arg4, arg5) {
- let daysCount = Number(arg1);
- let confectionersCount = Number(arg2);
- let cakesCount = Number(arg3);
- let wafflesCount = Number(arg4);
- let pancakesCount = Number(arg5);
- let cakes = cakesCount * 45;
- let waffles = wafflesCount * 5.8;
- let pancakes = pancakesCount * 3.2;
- let sumForDay = (pancakes + waffles + cakes) * confectionersCount;
- let totalMoney = sumForDay * daysCount;
- let money = totalMoney - (1 * totalMoney) / 8;
- console.log(money);
- }
- company("23",
- "8",
- "14",
- "30",
- "16");
Advertisement
Add Comment
Please, Sign In to add comment