**fig2_9.txt** /* 1*/ // Return position of X in A. /* 2*/ int /* 3*/ Binary_Search( const Etype A[ ], const Etype & X, const int N ) /* 4*/ { /* 5*/ int Low = 0, High = N - 1; /* 6*/ int Mid; /* 7*/ while( Low <= High ) /* 8*/ { /* 9*/ Mid = ( Low + High ) / 2; /*10*/ if( A[ Mid ] < X ) /*11*/ Low = Mid + 1; /*12*/ else if( A[ Mid ] > X ) /*13*/ High = Mid - 1; /*14*/ else /*15*/ return Mid; /*16*/ } /*17*/ return Not_Found; // Return -1. /*18*/ }