Code:
if ( score > highscore )
highscore = score;
else if (score < lowscore )
lowscore = score;
You have declared lowerscore as 1 so if you enter 20 is bigger than your already given(1) lower score so it doesn't take it.
I suggest to set first input as lowscore.
like:
Code:
bool isfirstinput(true);
while(!cin.eof()){
Leave a comment: