Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cinema(type, arg1, arg2) {
- let rows = Number(arg1);
- let columns = Number(arg2);
- let income = 0;
- if (type == "Premiere") {
- income = rows * columns * 12.0;
- } else if (type == "Normal") {
- income = rows * columns * 7.50;
- } else if (type == "Discount") {
- income = rows * columns * 5.00;
- }
- console.log(`${income.toFixed(2)} leva`);
- }
- cinema("Premiere", "10", "12");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement