Have you ever run ipconfig or ping from the command prompt? These are also console programs and they will also not keep the command prompt open once they complete.
If you don't want to modify your source code (which you don't have to):
1. open a command prompt (I use WIN+R, then type "cmd").
2. Navigate to your working directory with "cd", or right click and paste the folder address.
3. Type your executable's name and hit "Enter"
for (int count = 0; count < numstudents; count++ )
total += students[count];
average = total / numstudents;
cout << "Students Watched on Average: " << average <<" Movies"<< endl;
cout << "the median is" << median << endl;
std::cout << "Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );