Editorial for WC '18 Contest 1 J3 - Comparing Grades
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Let's create a function which takes a percentage grade as its argument, and returns the letter grade which corresponds to . This function may be implemented with a series of if-statements which check which of the letter grades' ranges falls into. We can then check whether is equal to , outputting Same
if so, and Different
otherwise.
Comments