The easiest way to do this is to change printGrade so that it returns a char. Then just return the appropriate letter. For example you could use a function like this:
// Renamed printGrade to better convey
// the semantics of the function
char convertScoreToGrade(int cScore)
{
if (cScore >= 90)
return 'A';
else if (cScore >= 80)
return 'B';
else if (cScore >= 70)
return 'C';
else if (cScore >= 60)
return 'D';
else
return 'F';
}
Now you just need to move all the printing that was in printGrade into the main function and call this function to get the letter grade.