So my code in C for the mario steps is correct except that it shows an output when foo is input rather than re-prompting for a valid integer. I did check50 and this was the only error. Where can I read up on how to solve this problem? Or can someone explain the best way to code a failure for when a character is input while running my code? I looked at other questions similar to this but it wasn't the exact same error so I have yet to find a solution.
The get_int function from the cs50 library does this for you already, but there is a way to do this without using the cs50 library you can just research about Exceptions, try and catch statements. They are what programmers use deal with input errors like this and they should be fairly simple to understand.