I have written this game, but the input keeps giving me an EOF error, any way to fix this? https://code.sololearn.com/citfit7vjHlF/?ref=app
Blake Haynes , in my opinion: in Playground you should enter the whole input at once - it's not interactive. And if you don't guess the number it causes infinite loop. That's why the program never reaches the end. Maybe you should add as a condition number of tries to guess the number.
End of file while reading code by compiler. Use try and catch .
So how would i go about using try and catch in this?