-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGrade.java
More file actions
29 lines (25 loc) · 805 Bytes
/
Copy pathGrade.java
File metadata and controls
29 lines (25 loc) · 805 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
import java.util.Scanner;
class Grade {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("welcome to check grade based on marks");
System.out.println("enter the marks:");
int marks = input.nextInt();
if (marks > 90 ) {
System.out.println("GRADE A secured");
}
else if (marks >75 && marks< 90) {
System.out.println("GRADE B secured");
}
else if (marks > 60 && marks < 75) {
System.out.println("GRADE C secured");
}
else if (marks > 30 && marks< 60) {
System.out.println("GRADE D secured");
}
else{
System.out.println("GRADE F secured");
}
input.close();
}
}