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 A = scanner.nextLine();
- int B = Integer.parseInt(scanner.nextLine());
- int C = Integer.parseInt(scanner.nextLine());
- double D = 0.00;
- if ("Premiere".equals(A)){
- D=B*C*12;
- }else if ("Normal".equals(A)){
- D=B*C*7.5;
- }else if ("Discount".equals(A)){
- D=B*C*5;
- }
- System.out.printf("%.2f",D);
- }
- }
Add Comment
Please, Sign In to add comment