Originally Posted by **Richie T**

here's what i make of it: The first loop sets a reference position

in the array, starting at 0. Then the second loop compares this to

all array elements after this position to see which is greater

or smaller, and swaps them if necessary. So starting at 0,

it seaches the array and through successive swaps it moves

the smallest number into position 0. Then it moves to position

1, checks all elements after that postion and the result is that

the smallest element from elements 1 to 9 is eventually moved

into 1. So you can see that repeating the process each postion

at a time will sort the array. Hope that clears it up