public static void f(int[] theArray, int n) {
  int temp;
  for (int j = 0; j < n; ++j) {
    int i = 0;
    while (i <= j) {
      if (theArray[i] < (theArray[j])) {
        temp = theArray[i];
        theArray[i] = theArray[j];
        theArray[j] = temp;
      }  // end if
      ++i;
    }  // end while
  }  // end for
}  // end f