Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tennisEquipment(input) {
- let racketPrice = Number(input[0]);
- let racketCount = Number(input[1]);
- let sneakersCount = Number(input[2]);
- let racketsSum = racketPrice * racketCount;
- let sneackersSum = racketPrice / 6 * sneakersCount;
- let price = (racketsSum + sneackersSum) + ((racketsSum + sneackersSum) * 0.2);
- console.log(`Price to be paid by Djokovic ${Math.floor(price / 8)}`);
- console.log(`Price to be paid by sponsors ${Math.ceil(price * 7 / 8)}`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement