// Program to read info from a file, make simple calculations // and print results to a file // Jim Crumley 20090213 // #include #include #include #include using namespace std; int main () { ifstream inp; ofstream out; inp.open("first_num"); out.open("results"); const int n=100000; int num_step, i; float x[n], y[n], z[n], t[n], delt_t; char title[80]; //minor error checking if(inp ==0) cout << "Egads input file didn't open. That can't be good.\n"; if(out ==0 ) cout << "Output file didn't open. I should really crash.\n"; //read from input file inp.getline(title,80); inp>>num_step>>delt_t>>x[0]>>y[0]>>z[0]; inp.close(); //echo input cout<