   void Bubblesort( double A[], int n ) {
   // sort the array A of size n into ascending order
      int i; double t;
      if( n==1 ) return;
      for( i=1; i<=n-1; i++ )
         if( A[i-1] > A[i] ) {
             t = A[i-1]; A[i-1] = A[i]; A[i] = t;
         }
      Bubblesort(A,n-1);
     return;
  }

