#include #include #include #include #include using namespace std; int main() { ifstream In; ofstream Out; In.open("expgrowin.txt"); Out.open("expgrowout.txt"); if (In.fail()) { cout << "Input file not found: " << In << endl; cout << "Existing..." << endl; return EXIT_FAILURE; } double Reserve, Rate; double AGR, resOut, resHalf; In.ignore(INT_MAX, '/n'); In >> Reserve >> Rate; In.ignore(INT_MAX, '/n'); while ( In ) { In >> AGR; In.ignore(256, '/n'); resOut = 1/AGR * log((AGR * Reserve)/Rate + 1); resHalf = 1/AGR * log((AGR * Reserve)/(2 * Rate) + 1); } In.clear(); Out << "Programmer: Kyle Kim" << endl << "Exponential Growth and Decay" << endl << endl << " Initial Data" << endl << "Reserve: " << Reserve << endl << "Rate: " << Rate << endl; In.close(); Out.close(); return 0; }