-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram6.cpp
More file actions
51 lines (48 loc) · 1.04 KB
/
program6.cpp
File metadata and controls
51 lines (48 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <iostream>
using namespace std;
int main()
{
cout << "Enter your marks: ";
int marks;
cin >> marks;
if (marks >= 0 && marks <= 100)
{
if (marks >= 90)
{
cout << "Your grade is A+" << endl;
}
else if (marks >= 80)
{
cout << "Your grade is A" << endl;
}
else if (marks >= 70)
{
cout << "Your grade is B+" << endl;
}
else if (marks >= 60)
{
cout << "Your grade is B" << endl;
}
else if (marks >= 50)
{
cout << "Your grade is C" << endl;
}
else if (marks >= 40)
{
cout << "Your grade is D" << endl;
}
else if (marks >= 30)
{
cout << "Your grade is E" << endl;
}
else
{
cout << "Your grade is F" << endl;
}
}
else
{
cout << "Please enter valid marks." << endl;
}
return 0;
}