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:6)
Scanner is not working
Hey @monishmakkar25
NoSuchElementException indicates that the element being requested does not exist. so try to check your loops if they are running for more iterations than needed
this code is running fine in inteliJ but not working here. is there anything special i need to do?
give custom input while compiling
still the same error
your submissions show that you have scored 100.great!
if this solves your doubt please mark it as resolved 