- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrade.java
More file actions
Latest commit
34 lines (31 loc) · 742 Bytes
/
Copy pathgrade.java
File metadata and controls
34 lines (31 loc) · 742 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
importjava.util.*;
classgrade
{
publicstaticvoidmain(Stringargs[])
{
Scannerscan=newScanner(System.in);
intmarks;
System.out.println("Enter the marks:");
marks=scan.nextInt();
if(marks>=90)
{
System.out.println("A grade");
}
elseif(marks>=80 && marks<90)
{
System.out.println("B grade");
}
elseif(marks>=70 && marks<80)
{
System.out.println("C grade");
}
elseif(marks>=60 && marks<70)
{
System.out.println("D grade");
}
else
{
System.out.println("Fail");
}
}
}