#include #include #include #include "nr.h" using namespace std; // Driver for routine gauher DP func(const DP x) { return cos(x); } int main(void) { const DP SQRTPI=1.772453850905516027; int i,n; DP check,xx; for (;;) { cout << "Enter N (or 0 to stop): "; cin >> n; cout << endl; if (n < 1) break; Vec_DP x(n),w(n); NR::gauher(x,w); cout << " #" << setw(13) << "x(i)" << setw(15) << "w(i)" << endl; cout << fixed << setprecision(6); for (i=0;i