Runtime error / Exception in thread "main" java.util.NoSuchElementException

Everytime when I give custom input to the code, it successfully gives the right result. But when I run the code without custom input it shows Runtime Error everytime.
This is my code

Here is the screenshot of output:


please provide custom input before clicking RUN button.

1 Like

Thanks for helping me out. I didn’t knew how “Run” and “Submit” works here.

1 Like