That's a better description of the project, but you could have posted it in your original thread.
As I see it the trick is to keep track of the original element indexes after you have sorted the array. I can think of two ways to do that.
First, copy the original array, sort the copied array, then loop through the original array to find the index of the element with the same value as the current element in the sorted array and place it in a third array containing the indexes in the original . Sort of a mapping of values in the sorted array to indexes in the original array.
Second option, create a struct holding the value and the index of each element in the original array, make an array of struct and sort it based on value, then display it using the indexes stored in each struct object.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Offline 2,253 posts
since Jul 2005