We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7edebe commit 6a272c0Copy full SHA for 6a272c0
grade_checker.java
@@ -0,0 +1,27 @@
1
+import java.util.Scanner;
2
+public class grade_checker {
3
+ public static void main(String[] args) {
4
+ Scanner sc= new Scanner(System.in);
5
+ System.out.println("Enter your marks: ");
6
+ int marks= sc.nextInt();
7
+/*
8
+ if( marks>= 90){
9
+ System.out.println("GRADE A");
10
+ }
11
+ else if( marks>= 75){
12
+ System.out.println("GRADE B");
13
14
+ else if( marks>= 50){
15
+ System.out.println("GRADE C");
16
17
+ else {
18
+ System.out.println("FAIL");
19
20
+
21
22
+ */
23
+ String grade= (marks>= 90)?"A":(marks>= 75)?"B":(marks>= 50)?"C":"Fail";
24
+ System.out.println("GRADE IS "+ grade);
25
26
27
+}
0 commit comments