In the following code, when I press 9 the program should exit:
case 9:
exit(0);
After pressing 9 the screen below in the cmd is displayed, but after pressing 9 the message: Press to close this window ... and it is necessary to click a key again to close the cmd window. The question is, is there any command that directly closes the cmd window when I press the number 9?