If you want help, you'll have to provide an SSCCE that demonstrates the problem. That seems like way too much code for simply inputting a single number at a time and checking it against a known value.