Help me please

Ok so basically because the loop runs so fast in this code i dont get to see what the cout is. heres the code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include<iostream>

using namespace std;

int main()
{
    
    int score;
    cout << "Enter your score: ";
    cin >> score;
    
    if (score > 500)
    cout << "\nYou got over 500. Nice score.\n";
    else
    cout << "\nYou got 500 or less. Nothing to brag about.\n";
    
    return 0;
    
}


i tried using cin.ignore() but it didn't work. please help me out :D
try cin.get() instead of cin.ignore();
but both of them should work.

//.....
cin.get();
return 0;
}
It still does the same thing :(
hmm, then try:
 
system("pause");

and if this is't going to work, then there must be something wrong with your pc;-)
Thanks it works perfect now :D
Topic archived. No new replies allowed.