pbrockway2 is correct. You should be checking if NumAnswer is greater than or equal to CorrectAnswer-tolerance AND NumAnswer is less than or equal to CorrectAnswer+tolerance.