forked from bliblidotcom/training-java-future-program
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhw.java
More file actions
35 lines (33 loc) · 577 Bytes
/
hw.java
File metadata and controls
35 lines (33 loc) · 577 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
25
26
27
28
29
30
31
32
33
34
35
//Abdi Elman D. A.
//import java.util.*;
public class hw{
public static void main(String[] args){
//Scanner scaner = new Scanner(System.in);
if(args.length != 1){
System.out.println("----");
}
//int score = scaner.nextInt();
int score = Integer.parseInt(args[0]);
String grade;
if(score<=20)
{
grade = "E";
}
else if(score > 20 && score <= 40)
{
grade = "D";
}
else if(score >40 && score <= 60)
{
grade = "C";
}
else if(score >60 && score <=80)
{
grade = "B";
}
else{
grade = "A";
}
System.out.println(grade);
}
}