#include #include #include #include "nr.h" using namespace std; // Driver for routine hunt int main(void) { const int N=100; int i,j,ji; DP x; Vec_DP xx(N); // create array to be searched for (i=0;i -1)) { cout << setw(12) << x << setw(7) << ji << setw(7) << j; cout << setw(13) << xx[j] << setw(13) << xx[j+1] << endl; } else if (j == N-1) { cout << setw(12) << x << setw(7) << ji << setw(7) << j; cout << setw(13) << xx[j] << " upper lim" << endl; } else { cout << setw(12) << x << setw(7) << ji << setw(7) << j; cout << " lower lim" << setw(13) << xx[j+1] << endl; } } return 0; }