the in input file is like
2 80 97
5 69 79 89 99 58
7 60 70 80 90 100 0 59
[
2 80 97
5 69 79 89 99 58
7 60 70 80 90 100 0 59
[
if ( score > highscore )
highscore = score;
else if (score < lowscore )
lowscore = score;
bool isfirstinput(true);
while(!cin.eof()){
....
...
cin >> score;
if(isfirstinput==true)
{
lowscore=score;
isfirstinput = false; // so it won't pass to lowscore again
}
...
Comment