  int temp;
  for (int j = 1; j < n-1; ++j) {
    int i = j + 1;
    do {
      if (theArray[i] < theArray[j]) {
        temp = theArray[i];
        theArray[i] = theArray[j];
        theArray[j] = temp;
      }  // end if
      ++i;
    } while (i <= n);
  }  // end for