Mishakis

Cinema

Jul 18th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner Scanner = new Scanner(System.in);
  7.  
  8.         String projection = Scanner.nextLine();
  9.         int rows = Integer.parseInt(Scanner.nextLine());
  10.         int columns = Integer.parseInt(Scanner.nextLine());
  11.  
  12.         double sum =0;
  13.  
  14.         int seats = rows * columns;
  15.  
  16.         switch (projection){
  17.             case "Premiere":
  18.                 sum = seats * 12.0;
  19.                 System.out.println(sum);
  20.                 break;
  21.             case "Normal":
  22.                 sum = seats * 7.5;
  23.                 System.out.println(sum);
  24.                 break;
  25.             case "Discount":
  26.                 sum = seats * 5.0;
  27.                 System.out.println(sum);
  28.                 break;
  29.              default:
  30.                  break;
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment