forked from bliblidotcom/training-java-future-program
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLetterGrade.java
More file actions
Latest commit
24 lines (24 loc) · 689 Bytes
/
Copy pathLetterGrade.java
File metadata and controls
24 lines (24 loc) · 689 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
publicclassLetterGrade{
publicstaticvoidmain(String[] args){
if(args.length != 1){
System.out.println("Usage: LetterGrade <numeric-sscore>");
return;
}
intscore = Integer.parseInt(args[0]);
if(score <20){
System.out.println("Nilai anda E");
}
elseif(score <40){
System.out.println("Nilai anda D");
}
elseif(score <60){
System.out.println("Nilai anda C");
}
elseif(score <80){
System.out.println("Nilai anda B");
}
else{
System.out.println("Nilai anda A");
}
}
}