Hoping for something more elegant than
if (i>0 && i<100)
Use this code :
if (lowerBound <= val && val < upperBound) or if (lowerBound <= val && val <= upperBound)