It is necessary that the program in the loop requested to enter a value until q is entered. When q is entered, the program should close.
#include <windows.h> #include <conio.h> int _tmain() { int ch = 0; while (ch != 'q') { ch = _getch(); ch = toupper(ch); } }
Where is the mistake?