Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- import java.util.StringTokenizer;
- public class test2 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- String type = scan.nextLine().toLowerCase();
- int r = Integer.parseInt(scan.nextLine());
- int c = Integer.parseInt(scan.nextLine());
- int full=r*c;
- double income=1;
- switch (type){
- case "premiere":
- income=full*12;
- break;
- case "normal":
- income=full*7.50;
- break;
- case "Discount":
- income=full*5;
- break;
- }
- System.out.printf("%.2f",income);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement