-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_25Grade.cpp
More file actions
67 lines (53 loc) · 1.43 KB
/
_25Grade.cpp
File metadata and controls
67 lines (53 loc) · 1.43 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <iostream>
using namespace std;
int main()
{
char choice;
float marks;
do
{
cout<< "Enter marks for Student: ";
cin >> marks;
cout << "****************************\n\n";
if (marks >= 80 && marks <= 100)
{
if (marks >= 90)
{
cout << "Your grade is: A+\nEXCELLENT!!!" << endl;
}
else
{
cout << "Your grade is: A\nGREAT :)" << endl;
}
}
else if(marks >= 65 && marks <80)
{
cout << "Your grade is: B\nVERY GOOD" << endl;
}
else if(marks >= 50 && marks < 65)
{
cout << "Your grade is: C\nAVERAGE" << endl;
}
else if (marks >= 35 && marks < 50)
{
cout << "Your grade is: D\nHARDLUCK" << endl;
}
else if (marks >=0 && marks < 35)
{
cout << "Your grade is: F\nYOU HAVE FAILED :(" << endl;
}
else
{
cout << "Please enter valid marks" << endl;
}
cout << "\n****************************\n";
cout << "\nDo you want to enter for another student? Y/N: ";
cin >> choice;
if (choice == 'n' || choice == 'N')
{
break;
}
} while (choice == 'y' || choice == 'Y');
cout << "Thankyou user :)\nProgram is over";
return 0;
}