Von neuman pattern run error

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)

i cant understand the error

Hi @deepanshu_123,
I think you are trying to run the program without giving input.Place input in the sample input box below the online ide. Hope this helps.

yes buddy i had placed the input still error is coming dont know why

You are not reducing t count. So the loop continues. Check the top while loop .

1 Like