Advertisement
aneliabogeva

Cinema

Nov 10th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class BiggerNumber {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. String typeProjects = scanner.nextLine();
  7. Double rows = Double.parseDouble(scanner.nextLine());
  8. Double columns = Double.parseDouble(scanner.nextLine());
  9. Double income = 0.0;
  10.  
  11. switch(typeProjects){
  12. case "Premiere":
  13. income = rows * columns * 12.00;
  14. break;
  15. case "Normal":
  16. income = rows * columns * 7.50;
  17. break;
  18. case "Discount":
  19. income = rows * columns * 5.00;
  20. break;
  21. }
  22. System.out.printf("%.2f",income);
  23. }
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement