repeat program function failure in C, scanf related?
问题 So I'm trying to ask the user if they would like to repeat my program and I am getting a weird result now and then. It doesn't happen everytime and I havn't been able to figure out what triggers it. To me it looks like it is assigning the 'return' after I enter 'q' to repeatProgram instead of the 'q' but I have no Idea why. The output when it works: to exit enter q, to continue enter y. s you've entered s, that isn't a valid option. The output when it fails: to exit enter q, to continue enter