Advertisement
MladenKarachanov

Untitled

Mar 23rd, 2022
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. package programmingBasics;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Cinema {
  6. public static void main(String[] args) {
  7. Scanner scanner= new Scanner(System.in);
  8. String project =scanner.nextLine();
  9. int num=Integer.parseInt(scanner.nextLine());
  10. int num2=Integer.parseInt(scanner.nextLine());
  11. double price=0;
  12. double result=num*num2;
  13. switch(project){
  14. case "Premiere":
  15. price=12.00;
  16. break;
  17. case "Normal":
  18. price=7.50;
  19. break;
  20. case "Discount":
  21. price=5.00;
  22. break;
  23.  
  24. }System.out.printf("%.2f leva",price*result);
  25. }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement