I suppose one way to do it would be to create an array of 101 characters, each array element represents the numeric grade. The use the grade to index into that array. For example
char grades[101] = {0};
grades[100] = grades[99] = grades[98] =
grades[97] = grades[96] = grades[95] = 'A';
grades[94] = grades[93] = grades[92] =
grades[91] = grades[90] = 'B';
// now get the grade
int score = 93;
char gr = grades[score];
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343