borkins

11. Cinema

Mar 26th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. /**
  2.  * Project: Complex_Conditions - created by borkins on 2017-03-26.
  3.  */
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class _11_Cinema
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         Scanner console = new Scanner(System.in);
  12.        
  13.         String projection = console.nextLine();
  14.         int rows = Integer.parseInt(console.nextLine());
  15.         int cols = Integer.parseInt(console.nextLine());
  16.        
  17.         double fee = 0d;
  18.        
  19.         switch (projection)
  20.         {
  21.             case "Premiere":
  22.                 fee = 12.00;
  23.                 break;
  24.             case "Normal":
  25.                 fee = 7.50;
  26.                 break;
  27.             case "Discount":
  28.                 fee = 5.00;
  29.                 break;
  30.         }
  31.         System.out.printf("%.2f leva%n", (rows * cols * fee));
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment