Fixed bug for verifying user input: now if user input a String which is not a number, program will report a bug