-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudentGradeSystem.java
More file actions
41 lines (28 loc) · 885 Bytes
/
studentGradeSystem.java
File metadata and controls
41 lines (28 loc) · 885 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
36
37
38
39
40
41
import java.util.Scanner;
// Write a program that takes marks (0-100) as input and prints the grade.
public class studentGradeSystem{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the marks of Student :");
double marks = sc.nextDouble();
if(marks >=90 && marks <=100){
System.out.println("A");
}
else if (marks >=75 && marks <=89){
System.out.println("B");
}
else if (marks >=60 && marks <=74){
System.out.println("C");
}
else if (marks >=40 && marks <=59){
System.out.println("D");
}
else if (marks < 40){
System.out.println("Fail");
}
else{
System.out.println("Wrong Input..!");
}
sc.close();
}
}