Perhaps maybe this might get you started:

Code:

for(value_count = 0, value_count < 1000, value_count++)
{
// insert code to read from your file
/* this sorts the list */
if (value_read > value_order[0]) // if the value read is above the highest order
{
value_order[8] = value_order[9]; // moves existing values removing the current lowest
value_order[7] = value_order[8];
value_order[6] = value_order[7];
value_order[5] = value_order[6];
value_order[4] = value_order[5];
value_order[3] = value_order[4];
value_order[2] = value_order[3];
value_order[1] = value_order[2];
value_order[0] = value_order[1];
value_order[0] = value_read; // this must be last
}
else if (value_read > value_order[1]) // if value read is above the second highest order
{
value_order[8] = value_order[9]; // moves existing values removing the current lowest
value_order[7] = value_order[8];
value_order[6] = value_order[7];
value_order[5] = value_order[6];
value_order[4] = value_order[5];
value_order[3] = value_order[4];
value_order[2] = value_order[3];
value_order[1] = value_order[2];
value_order[1] = value_read; // this must be last - array index 0 is not modified
}
else if // and so on
}

This gives the rough idea - it's the system I use for my 2D game's high scores. Note the patterns and you should be able to continue on. I'm sure there's a better way, but it gives the general idea.