-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path04 (Java) Determines a student grade.java
More file actions
41 lines (34 loc) · 1.12 KB
/
04 (Java) Determines a student grade.java
File metadata and controls
41 lines (34 loc) · 1.12 KB
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
package BasicCode;
import java.util.Scanner;
public class BasicCode {
public static void main(String[] args){
Scanner input_var = new Scanner(System.in);
int num;
System.out.print("Enter the number: ");
num = input_var.nextInt();
if (num >= 80){
System.out.println("The student\'s grade is A+");
}
else if(num<80 && num>=70 ){
System.out.println("The student\'s grade is A");
}
else if(num<70 && num>=60 ){
System.out.println("The student\'s grade is A-");
}
else if(num<60 && num>=50 ){
System.out.println("The student\'s grade is B");
}
else if(num<50 && num>=40 ){
System.out.println("The student\'s grade is C");
}
else if(num<40 && num>=33 ){
System.out.println("The student\'s grade is D");
}
else
System.out.println("The student\'s grade is F");
}
}
/* ----- Output ----
Input: Enter the number: 64
Result: The student's grade is A-
*/