My program is shutting down earlier than I want it to. I have tried using all of the pause options given to me and still having trouble. Here is the code as it was originally written. I have added comments in it where I am having the problem. I hope this will help to understand my problem better.
#include <iostream>
using namespace std;
int main()
{
int score;
cout << "Enter your score:";
cin >> score;
/* Here is where the problem occurs. It will let me enter the score, but as soon as I hit the Enter key it flashes through the rest and closes the program. I have tried every suggestion given to me so far and nothing is keeping open. It is so frustrating! */
if (score > 500)
cout << "\nYou got over 500. Nice score\n.";
else
cout <<"\nYou got 500 or less. Nothing to brag about.\n";