Switch case?

I learned something today!

BTW, the reason for using if..else rather than just straight if is that execution will stop as soon as the correct range is found. Using just if will mean every single condition will be tested even if the first if was executed as the correct case.