I cannot figure out how to get the input of the "desired grade" to increment, in the final output. I have no idea if I'm even using the enumerator correctly..
When the program asks, "What letter grade do you deserve?", you enter any grade listed in the enumeration, but the final output should be like this, for example:
What is your first name? John Doe
What is your last name? Hanncock
What letter grade do you deserve? A
What is your age? 33
Name: Hanncock, John Doe
Grade: B
Age: 33
Here is the code: thanks
#include <iostream>
using namespace std;
int main()
{
const char Size = 20;
char FirstName[Size];
enum grades{A, B, C, D, F};
grades YourGrade;
cout << "What is your first name? ";
cin.getline(FirstName, Size);
cout << "What is your last name? ";
char LastName;
cin >> LastName;
cout << "What letter grade do you deserve? ";
int J;
cin >> J;
YourGrade = grades(J) + 1;
cout << "What is your age? ";
int age;
cin >> age;