Xadez

Cinema

Apr 15th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.74 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Learning {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         String projection = scanner.nextLine();
  8.         int rows = Integer.parseInt(scanner.nextLine());
  9.         int columns = Integer.parseInt(scanner.nextLine());
  10.  
  11.         int seats = rows*columns;
  12.  
  13.         switch (projection) {
  14.             case "Premiere":
  15.                 System.out.printf("%.2f leva",seats*12.00);
  16.                 break;
  17.             case "Normal":
  18.                 System.out.printf("%.2f leva",seats*7.50);
  19.                 break;
  20.             case "Discount":
  21.                 System.out.printf("%.2f leva",seats*5.00);
  22.                 break;
  23.         }
  24.  
  25.  
  26.  
  27.     }
  28. }
Add Comment
Please, Sign In to add comment