I am writing a function which passes a score and returns a letter grade based on the score. Real simple stuff. However I cannot seem to understand what to do with a score that is less than 0 or greater than 100. In this case I would like to return an invalid statement but I cannot figure out how.
Basically I have it set up in a series of if-else if - else statements.
this is my final else statement
and letter_grade is of type char.Code:else letter_grade = 'invalid' ;
How can I pass 'invalid'