But you need more than one top score

As soon as the top score appears, people start to wonder what the second and third highest scores are:

You are missing some scores here... the 2nd and 3rd scores are a mystery.


It seems that the organizers didn't tell you everything you needed to know. The contest doesn't just award a prize for the winner, but also honors those surfers in second and third place.

Our program currently iterates through each of the lines in the results . txt file and works out the highest score. But what it actually needs to do is keep track of the top three scores, perhaps in three separate variables:

Looks like you need extra variables for the second and third highest scores.

Was this article helpful?

0 0

Post a comment