Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Cinema {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String projection = scanner.nextLine();
- int rows = Integer.parseInt(scanner.nextLine());
- int columns = Integer.parseInt(scanner.nextLine());
- double income = 0.0;
- switch (projection) {
- case "Premiere":
- income = rows * columns * 12;
- break;
- case "Normal":
- income = rows * columns * 7.5;
- break;
- case "Discount":
- income = rows * columns * 5;
- break;
- }
- System.out.printf("%.2f", income);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment