The first thing you need is a function that determines if a value is in a range. You perform that test 9 times, replicating code, instead of using a function.
The first thing you need is a function that determines if a value is in a range. You perform that test 9 times, replicating code, instead of using a function.