Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class _1_Cinema {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner scan = new Scanner(System.in);
- String projectionType = scan.next();
- int rows = scan.nextInt();
- int columns = scan.nextInt();
- int numberOfPeople = rows * columns;
- double incomes = numberOfPeople * 7.50;
- if (projectionType.equals("Premiere")) {
- incomes = numberOfPeople * 12.00;
- } else if (projectionType.equals("Discount")) {
- incomes = numberOfPeople * 5.00;
- }
- System.out.printf("%.2f leva", incomes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement