\begin{verbatim}
  1: void Bubblesort( double A[], int n ) {
  2: // sort the array A of size n into ascending order
  3:    int i; double t;
  4:    if( n==1 ) return;
  5:    for( i=1; i<=n-1; i++ )
  6:       if( A[i-1] > A[i] ) {
  7:           t = A[i-1]; A[i-1] = A[i]; A[i] = t;
  8:       }
  9:    Bubblesort(A,n-1);
 10:    return;
 11: }
\end{verbatim}
