Skip to content

Commit

Permalink
Create Main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesM134 authored Dec 1, 2022
1 parent 6f855b8 commit c9f4638
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 04-letter-grade/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class Main {
public static void main(String[] args) {
}

public static String letterGrade(double grade) {
String a = "A";
String b = "B";
String c = "C";
String d = "D";
String f = "F";

if (grade >= 90) {
return a;
} else if (grade >= 80 && grade < 90) {
return b;
} else if (grade >= 70 && grade < 80) {
return c;
} else if (grade >= 60 && grade < 70) {
return d;
} else {
return f;
}

}

}

0 comments on commit c9f4638

Please sign in to comment.