Quote:
Originally Posted by DewMan
The simplest thing would be to reverse your logic.
Check for the lowest value first, and the highest value last. Your value will get updated at each intermediate step that the check is valid.
if (score > 60)
grade = d
if(score > 70)
grade = c
if(score > 80)
grade = b
if(score > 90)
grade = a
|
exactly... that was one of the options i originally gave...