#include #include #include "nr.h" using namespace std; // Driver for routine ks2d1s int main(void) { int idum,jtrial,j,n1,ntrial; DP d,factor,prob,u,v; for (;;) { cout << "How many points? (0 to end)" << endl; cin >> n1; if (n1 == 0) break; Vec_DP x1(n1),y1(n1); cout << "What factor nonlinearity (0.0 to 1.0)?" << endl; for (;;) { cin >> factor; if (factor < 0.0) { cout << "factor less than 0" << endl; continue; } if (factor > 1.0) { cout << "factor greater than 1" << endl; continue; } break; } cout << "How many trials?" << endl; cin >> ntrial; idum = -289-ntrial-n1; for (jtrial=0;jtrial