Even or odd number?

This code compiles without error but when it's executed does not respond after number is entered. Is there a problem with the scans() or is it the logic?