#include #include #include #include #include "nr.h" using namespace std; // Driver for routine spear int main(void) { const int NDAT=20,NMON=12; int i,j; char temp[17]; string txt,txt2,city[NDAT],mon[NMON]; DP d,probd,probrs,rs,zd; Vec_DP data1(NDAT),data2(NDAT); Mat_DP rays(NDAT,NMON); ifstream fp("table2.dat"); if (fp.fail()) NR::nrerror("Data file table2.dat not found"); getline(fp,txt); getline(fp,txt2); fp >> txt; for (i=0;i> mon[i]; getline(fp,txt); getline(fp,txt); for (i=0;i> rays[i][j]; getline(fp,txt); } fp.close(); cout << endl << setw(16) << " "; for (i=0;i<12;i++) cout << setw(5) << mon[i]; cout << endl << endl; for (i=0;i