//--------------------------------------------------------- // Investments at Compound Interest // // Given the present value, the nominal annual rate, the // number of periods per year, and the number of years, // this program calculates the future value, the total // interest, and the APY (annual percentage yield). The // input comes from a file containing investment parameters // for an unknown number of investments. The ouput is in // tabular form and is written to a text file named // "Investments.txt". // // D. Searls // Asbury College // Oct 2007 //--------------------------------------------------------- #include #include #include #include #include using namespace std; const int MAXSIZE = 100; //--------------------------------------------------------- // readData // // Read the input data from a text file. // // //--------------------------------------------------------- void readData() { cout << "Read the data" << endl; } //--------------------------------------------------------- // calculateResults // // Calculate the results of the investments // // //--------------------------------------------------------- void calculateResults() { cout << "Calculate the results" << endl; } //--------------------------------------------------------- // writeTable // // Write the investment table to the output file. // // //--------------------------------------------------------- void writeTable() { cout << "Write the table to the file" << endl; } //--------------------------------------------------------- // M A I N D R I V E R //--------------------------------------------------------- int main() { double pv[MAXSIZE]; double r[MAXSIZE]; int ppy[MAXSIZE]; int years[MAXSIZE]; double fv[MAXSIZE]; double interest[MAXSIZE]; double apy[MAXSIZE]; int n; readData(); calculateResults(); writeTable(); cout << "The table of investments is in the file 'Investments.txt'.\n"; return 0; }