Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function weddingParty(input) {
- let guests = Number(input[0]);
- let budget = Number(input[1]);
- budget -= guests * 20;
- if (budget < 0) {
- console.log(`They won\'t have enough money to pay the covert. They will need ${Math.abs(budget)} lv more.`);
- }
- else {
- console.log(`Yes! ${Math.round(0.40 * budget)} lv are for fireworks and ${Math.round(0.60 * budget)} lv are for donation.`);
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement