With most newer IDE environments, when you execute a terminal program in windows, as soon as the program is terminated, the terminal window will close. There are ways to alter this behavior, but usually the best course of action is to open a persistent terminal window, and execute your program from there.
For example, go to "RUN" and type: cmd.
Then navigate to the directory where the program is compiled, for instance cd C:\users\administrator\documents\debug.
Then, you simply execute the program by invoking its name, for example, C:\helloworld.exe.
Your other option is to put some kind of pause statement at the end of your program, to allow you to view the output.
For instance:
int End1;
cin >> End1;
return 0;
Then, the program will wait for you to enter an integer, giving you time to view the programs output before the terminal window is closed.