Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- 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 sum =0;
- int seats = rows * columns;
- switch (projection){
- case "Premiere":
- sum = seats * 12.0;
- System.out.println(sum);
- break;
- case "Normal":
- sum = seats * 7.5;
- System.out.println(sum);
- break;
- case "Discount":
- sum = seats * 5.0;
- System.out.println(sum);
- break;
- default:
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment