forked from bliblidotcom/training-java-future-program
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScore.java
More file actions
Latest commit
23 lines (21 loc) · 483 Bytes
/
Copy pathScore.java
File metadata and controls
23 lines (21 loc) · 483 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Samuel Alferdo Astrada Napitupulu
// FUTURE3
publicclassScore{
publicstaticvoidmain(String[] args){
if(args.length != 1){
System.out.println("Usage: java Score <score>");
}
intscore = Integer.parseInt(args[0]);
if(score > 80){
System.out.println("A");
}elseif(score > 60){
System.out.println("B");
}elseif(score > 40){
System.out.println("C");
}elseif(score > 20){
System.out.println("D");
}else{
System.out.println("E");
}
}
}