We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5005a6 commit c6e0cfdCopy full SHA for c6e0cfd
Ques14.cpp
@@ -0,0 +1,33 @@
1
+#include <iostream>
2
+using namespace std;
3
+int main()
4
+{
5
+
6
+ int marks;
7
8
+ cout << "Enter marks obtained: ";
9
+ cin >> marks;
10
11
+ if (marks < 0 || marks > 100)
12
+ {
13
+ cout << "Error: Marks should be between 0 and 100." << endl;
14
+ }
15
+ else if (marks >= 90)
16
17
+ cout << "Grade: A+" << endl;
18
19
+ else if (marks >= 70)
20
21
+ cout << "Grade: A" << endl;
22
23
+ else if (marks >= 50)
24
25
+ cout << "Grade: B" << endl;
26
27
+ else
28
29
+ cout << "Grade: F" << endl;
30
31
32
+ return 0;
33
+}
0 commit comments