I am writing a program that:
scanf is set to read in an integer value,
when it reads char it goes into an infinite loop.
The program should instead, print an error msg and break out of the loop.
I tried to set everything in char and when it reads non digits it prints error message, but doesnt seem to work.