You've declared integer variables named A, B, C, D, etc. That's not really what you want here. You want to declare grade as a char variable. You want to put the character 'A', 'B', etc. in that char variable.

Example:

grade = 'A';

That puts the character 'A' into the variable grade.

If you remove those variables A...F, change grade to be of type char, and then rewrite your if-else statement to assigned letters 'A', 'B', etc. to grade, that should do the trick.

Take note of those single quotes around the characters. Those tell C++ that the thing between the quotes is a character constant.

Email codedump link for Having if/else trouble while creating a C++ class