Write your question here.
The problem with the following code is that when the user enters a temperature such as 8q instead of 86 or 3q instead of 30, the program interprets it as 8 or 3 and accepts it instead of displaying the error message. If the temperature is something like qq the program seems to work fine. Any ideas???
Since 86 and 30 are numbers they behave as you would expect. What would you expect the program to do if it is doing a formatted integer input operation and the input was '8q' or '3q'? 'q's are not numbers, and thus are discarded by the formatted input operation.
Why would the user of a temperature conversion program be entering 'q's?