What are you entering at the console? The nextInt method expects a whole number.
You can either change what you enter to be a whole number
or you can change the program so it will read a String. ...