Hi, I'm writing a program that requires me to use scanf. Is there a way to check if the user entered a int? Any help would be appreciated.
I'd be happy to cause a loop for unexpected input because then I could stop the loop with a flush and the user would be asked again to input the proper data. My problem is that after the first time it wont loop for a float. It only loops the first time.