-
Notifications
You must be signed in to change notification settings - Fork 0
/
assignment3.java
87 lines (83 loc) · 2.89 KB
/
assignment3.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import java.util.Scanner;
public class assignment3 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String brand, category;
int size;
System.out.println("what brand do you buy : ");
brand = sc.nextLine();
System.out.println("what category do you buy of this brand : ");
category = sc.nextLine();
System.out.println("enter the size : ");
size = sc.nextInt();
if (brand.equalsIgnoreCase("converse")) {
if (category.equalsIgnoreCase("slip on")) {
if (size <= 40) {
if (size >= 36) {
System.out.println("your amount is Rp.800.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
} else if (category.equalsIgnoreCase("high top")) {
if (size <= 44) {
if (size >= 40) {
System.out.println("your amount is Rp.1.200.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
}
} else if (brand.equalsIgnoreCase("sketcher")) {
if (category.equalsIgnoreCase("woman")) {
if (size <= 41) {
if (size >= 36) {
System.out.println("your amount is Rp.1.000.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
} else if (category.equalsIgnoreCase("man")) {
if (size <= 44) {
if (size >= 41) {
System.out.println("your amount is Rp.1.800.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
}
} else if (brand.equalsIgnoreCase("nike")) {
if (category.equalsIgnoreCase("kids")) {
if (size <= 40) {
if (size >= 36) {
System.out.println("your amount is Rp.750.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
} else if (category.equalsIgnoreCase("adult")) {
if (size <= 44) {
if (size >= 40) {
System.out.println("your amount is Rp.1.500.000");
} else {
System.out.println("not found data");
}
} else {
System.out.println("not found data");
}
}
} else {
System.out.println("invalid");
}
}
}