Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function voleyball(input) {
- let year = input[0];
- let p = Number(input[1]);
- let h = Number(input[2]);
- let game = ((48 - h) * 3 / 4) + h + p * 2 / 3;
- if (year === "leap") {
- game *= 1.15;
- }
- console.log(Math.floor(game));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement