Quote Originally Posted by VladimirF View Post
Consider this:
Code:
char findLetter(int grade)
{
	static char LetterGrade[] = "F...FD...DC...CB...BA...A";
	return LetterGrade[grade];
}
The ellipsis, of course, must be replaced with appropriate number of F’s, D’s, etc.
Good idea. You could further improve it by, instead of requiring one to manually count letters when creating the char array, instead populating a vector<char> using Boost.Assign's repeat() function.