Write a program to create an output file containing a custom
Write a program to create an output file containing a customized loan amortization table. Your program will prompt the user to enter the amount borrowed (the principal), the annual interest rate, and the number of payments (n). To calculate the monthly payment, it will use the formula from Programming Project 1 in Chapter 3. This payment must be rounded to the nearest cent. After the payment, has been rounded to the nearest cent, the program will write to the output file n lines showing how the debt is paid off. Each month part of the payment is the monthly interest on the principal balance, and the rest is applied to the principal. Because the payment and each month\'s interest are rounded, the final payment will be a bit different and must be calculated as the sum of the final interest payment and the final principal balance. Here is a sample table for a $1000 loan borrowed at a 9% annual interest rate and paid back over 6 months.
Solution
class Test { private: int data1; float data2; public: void function1() { data1 = 2; } float function2() { data2 = 3.5; return data; } }; int main() { Test o1, o2; }