I don’t understand. I wrote a "hello world" program and run it, console only shows up immediately and turns itself off.
You guys can help me please
I want to use vscode console to input the result then print it with the line "press any key to countinue" like DevC++. I want it to not turn itself off when I haven’t entered all the cases
2
Answers
After your while loop, add:
_getch();
Then the application will wait untill you press a key.
What’s happening is when the
caSe
is zero the application leaves the loop. Then there is no code left and the application exits.But please remove the second image and replace the first with your code. We love to copy your code to help you out. The programs output you should write out too, although in this case not needed when you write clearly what is happening. And state clearly what you want to do.
Try adding this in the last place.