forked from bliblidotcom/training-java-future-program
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
Latest commit
24 lines (24 loc) · 604 Bytes
/
Copy pathHelloWorld.java
File metadata and controls
24 lines (24 loc) · 604 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
publicclassHelloWorld{
publicstaticvoidmain(String[] args) {
intinput = Integer.parseInt(args[0]);
// int input = Integer.parseInt(System.console().readLine());
if(input>=1&&input<=20){
System.out.println("Nilai E");
}
elseif(input>=21&&input<=40){
System.out.println("Nilai D");
}
elseif(input>=41&&input<=60){
System.out.println("Nilai C");
}
elseif(input>=61&&input<=80){
System.out.println("Nilai B");
}
elseif(input>=81&&input<=10){
System.out.println("Nilai A");
}
else{
System.out.println("Input angka 1-100");
}
}
}