+ 4
Experimenting with getting input in java
I have modified SoloLearn example for getting input in java as follows. But it does not work. What is the source of error? https://code.sololearn.com/ck0SxAe8gfUX/?ref=app
3 Answers
+ 6
try inputting this:
5
6
0
The error is that Sololearn only supports one input from the user at a time. So when the program needs multiple inputs, you'll need to write each input on a new line
+ 4
Your program will crash if there is no 0 in the input, as it's an infinite loop. Make sure you have a 0.
+ 4
Thanks Limitless!