Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class E11Cinema {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- String ticketType = scanner.nextLine().toLowerCase();
- int columsCount = Integer.parseInt(scanner.nextLine());
- int rowCount = Integer.parseInt(scanner.nextLine());
- double total = 0;
- if (ticketType.equals("premiere")){
- total = columsCount * rowCount * 12;
- }
- else if (ticketType.equals("normal")){
- total = columsCount * rowCount * 7.50;
- }
- else if (ticketType.equals("discount")){
- total = columsCount * rowCount * 5;
- }
- System.out.printf("%.2f leva", total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement