I see the issue you're having. This is because input.nextInt() does not read the newline character generated when you hit the return key. You can fix this by changing the last line to:


...