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 f9515d3 commit 8c178acCopy full SHA for 8c178ac
challenge14.java
@@ -0,0 +1,24 @@
1
+import java.util.Scanner;
2
+
3
+// Create a program that calculates grade based on their marks.🚀
4
+public class challenge14 {
5
+ public static void main(String[] args) {
6
+ Scanner sc = new Scanner(System.in);
7
+ System.out.println("Enter your marks know your grade, you are(A,B,C,D, or F)");
8
+ System.out.print("Enter your marks: ");
9
+ int marks = sc.nextInt();
10
+ if(marks >= 90 && marks <= 100){
11
+ System.out.println("Great, You have got Grade (A)");
12
+ } else if(marks >= 75 && marks < 90){
13
+ System.out.println("Good, You have got Grade (B)");
14
+ } else if(marks >= 60 && marks < 75){
15
+ System.out.println("Work harder next time, You have got Grade (C)");
16
+ } else if(marks >= 30 && marks < 60){
17
+ System.out.println("You seriously need to work, You have got Grade (D)");
18
+ } else if(marks < 30 && marks >= 0){
19
+ System.out.println("Sorry, You have failed you got Grade (F)");
20
+ } else{
21
+ System.out.println("invalid!");
22
+ }
23
24
+}
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments