Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.Lecture4ComplicatetConditionalStatement;
- import java.util.Scanner;
- public class Cinema {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- String type = console.nextLine().toLowerCase();
- double r = Double.parseDouble(console.nextLine());
- double c = Double.parseDouble(console.nextLine());
- double price = 0.00;
- if (type.equals("Premiere")){
- price = 12.00;}
- else if (type.equals("Normal")){
- price = 7.50;}
- else if(type.equals("Discount")){
- price = 5.00;}
- System.out.print(r*c*price + " leva");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement