#include void bpm_dp_file() { cin.precision(10); cout.precision(10); double s,x,y,dp; double ss[78][42],xx[78][42],yy[78][42],dpdp[78][42]; char fname[100]; char fout[100]; int n; for(int i=0;i<41;i++) { double indi=0.986 + 0.0005*(double)i; sprintf(fname,"bpm_readings_%g",indi); ifstream in(fname); n=0; while (in >> s >> x >> y >> dp){ ss[n][i]=s; xx[n][i]=x; yy[n][i]=y; dpdp[n][i]=dp; // fscanf(out[n],"%.5g %.10g %.10g %.10g \n",&s,&x,&y,&dp); //scanf("%.5g %.10g %.10g %.10g \n",&s,&x,&y,&dp); //out[n] << s << " " << x << " " << y << " " << dp << endl; //cout << ss[n][i] << " " << xx[n][i] << " " << yy[n][i] << " " << dpdp[n][i] << endl; n++; } } // cout << " n " << n << endl; for(int h=0;h<78;h++){ sprintf(fout,"dp_bpm_%d",h+1); ofstream out(fout); out.precision(12); for(int j=0;j<41;j++){ out << ss[h][j] << " " << xx[h][j] << " " << yy[h][j] << " " << dpdp[h][j] << endl; } out.close(); } }