Closed larsks closed 1 year ago
I think this is reasonable but it should only exit if the error is io.EOF
. If it's a different error, like a failure to parse an integer, that should be reported to the user without exiting.
I've updated the code to only exit when we hit an EOF error. The existing code correctly produces warnings for other sorts of invalid input.
Exit if scanf returns an error, rather than going into an infinite loop if we are unable to read from stdin.
Closes #58