Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function christmasCandy(input) {
- let baklava = Number(input[0]);
- let muffin = Number(input[1]);
- let bowlAmount = Number(input[2]);
- let candyAmount = Number(input[3]);
- let biscuitsAmount = Number(input[4]);
- let bowlPrice = baklava + baklava * 0.6;
- let candyPrice = (muffin + muffin * 0.8);
- let biscuitsPrice = 7.5;
- let bowl = bowlPrice * bowlAmount;
- let candy = candyPrice * candyAmount;
- let biscuits = biscuitsPrice * biscuitsAmount;
- let totalAmount = ((bowl + candy + biscuits).toFixed(2));
- console.log(totalAmount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement