// print one row of output showing
the current
// part of the array being processed
void printRow( const int b[], int low, int mid,
int high, int size )
{
// loop through entire array
for ( int m = 0; m < size; m++ )
// display spaces if outside current
subarray range
if ( m < low || m > high )
cout << " ";
// display middle element marked
with a *
else
if ( m == mid ) // mark middle value
cout << setw( 3 )
<< b[ m ] << '*';
// display other elements in
subarray
else
cout << setw( 3 )
<< b[ m ] << ' ';
cout << endl; // start new line of output
} // end function printRow