/*this program obtains input from a data file and displays it.*/ #include #include #include #include #include #include using namespace std; int main () { string line; /*introduce the coeff array of length 3*/ double coeff[3] ; double roots[2] ; double *rpt,*cpt; rpt = roots ; cpt = coeff ; int counter = 0 ; ifstream myfile ("poly_data1.dat"); if (myfile.is_open()) { while ( getline (myfile,line) ) { double value = strtod(line.c_str(),NULL); std::cout<2) { *rpt = value ; ++rpt; }//else counter++; }//while myfile.close(); }//_statement else cout << "Unable to open file"<