grade counting to letter

help me what is wrong in my code it didnt display the letter.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
switch (score / 10)
{
case 9: // 90 - 99
....grade = 'A';
....break;
case 8: // 80 - 89
....grade = 'B';
....break;
case 7: // 70 - 79
....grade = 'C';
....break;
case 6: // 60 - 69
....grade = 'D';
....break;
default: // < 60
....grade = 'F';
....break;
}
If you want to display the value of grade you will have to print it.
std::cout << grade << std::endl;
Topic archived. No new replies allowed.