Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. package com.Lecture4ComplicatetConditionalStatement;
  2.  
  3. import java.util.Scanner;
  4. public class Cinema {
  5.  
  6. public static void main(String[] args) {
  7. Scanner console = new Scanner(System.in);
  8. String type = console.nextLine().toLowerCase();
  9.  
  10. double r = Double.parseDouble(console.nextLine());
  11. double c = Double.parseDouble(console.nextLine());
  12. double price = 0.00;
  13.  
  14. if (type.equals("Premiere")){
  15. price = 12.00;}
  16.  
  17. else if (type.equals("Normal")){
  18. price = 7.50;}
  19.  
  20. else if(type.equals("Discount")){
  21. price = 5.00;}
  22.  
  23. System.out.print(r*c*price + " leva");
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement