#include #include #include #include using namespace std; #include "myio.h" int main() { ifstream istr; ofstream ostr; int num; string name; double rNum; string filename; do { cout << "Enter input file name -- "; cin >> filename; openIn(istr,filename); cout << "Enter output file name -- "; cin >> filename; openOut(ostr,filename); ostr << fixed << setprecision(2); cout << "Enter an integer -- "; getValid(num); clrStream(); cout << "Enter your name -- "; getline(cin, name); cout << "Thanks for the number " << name << '.' << endl; float value; for (int i = 0; i < num; i++) { istr >> value; ostr << value << ' '; } cout << "Enter a real number -- "; getValid(rNum); clrStream(); ostr << rNum * value << endl; istr.close(); ostr.close(); cout << "Do you want to use another file (N to stop)? "; }while (toupper(getResponse('Y')) != 'N'); cout << "Good-bye" << endl; return 0; }