Skip to content

Commit 284d395

Browse files
committed
Added Grade.java with grading system
1 parent e09547a commit 284d395

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.thealgorithms.misc;
2+
3+
public class Grade {
4+
public String getGrade(int score) {
5+
if (score >= 90) return "A";
6+
if (score >= 80) return "B";
7+
if (score >= 70) return "C";
8+
if (score >= 60) return "D";
9+
return "F";
10+
}
11+
}

0 commit comments

Comments
 (0)