Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cinemaCash(input) {
- let type = input[0];
- let rows = Number(input[1]);
- let col = Number(input[2]);
- let totalSum = 0;
- if (type == "Premiere") {
- totalSum = (rows * col) * 12;
- } else if (type == "Normal") {
- totalSum = (rows * col) * 7.50;
- } else if (type == "Discount") {
- totalSum = (rows * col) * 5;
- }
- console.log(totalSum.toFixed(2));
- }
Add Comment
Please, Sign In to add comment