Error problem in this question on visual studio my code runs proper

Exception in thread “main” java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:862)
at java.util.Scanner.next(Scanner.java:1485)
at java.util.Scanner.nextInt(Scanner.java:2117)
at java.util.Scanner.nextInt(Scanner.java:2076)
at Main.main(Main.java:9)

hey @agarg11 This error comes only when you are trying to Scan a element but there is no element in the console.
So check if your code is asking for more elements than necessary.

Hey @agarg11since there was no reply from you for a while. So I am making this doubt as resolved.You can reopen it if you want.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.