Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function oscarsWeekInCinema(input) {
- let movieName = input[0];
- let typeOfHall = input[1];
- let ticketCount = Number(input[2]);
- let sum = ticketCount;
- if (movieName === "A Star Is Born") {
- if (typeOfHall === "normal") {
- sum *= 7.5;
- } else if (typeOfHall === "luxury") {
- sum *= 10.5;
- } else if (typeOfHall === "ultra luxury") {
- sum *= 13.5;
- }
- } else if (movieName === "Bohemian Rhapsody") {
- if (typeOfHall === "normal") {
- sum *= 7.35;
- } else if (typeOfHall === "luxury") {
- sum *= 9.45;
- } else if (typeOfHall === "ultra luxury") {
- sum *= 12.75;
- }
- } else if (movieName === "Green Book") {
- if (typeOfHall === "normal") {
- sum *= 8.15;
- } else if (typeOfHall === "luxury") {
- sum *= 10.25;
- } else if (typeOfHall === "ultra luxury") {
- sum *= 13.25;
- }
- } else if (movieName === "The Favourite") {
- if (typeOfHall === "normal") {
- sum *= 8.75;
- } else if (typeOfHall === "luxury") {
- sum *= 11.55;
- } else if (typeOfHall === "ultra luxury") {
- sum *= 13.95;
- }
- }
- console.log(`${movieName} -> ${sum.toFixed(2)} lv.`);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement