Reference no: EM1331471
Write a program to generate a table of factors used to compute monthly payments for the money borrowed.
Use the following formula to compute the payment factors.
( I + 1)^N * I
Payment Factor = ---------------------
( I + 1)^N - 1
Where
I = 1/12th of the interest rate
N = Total months in term
The factor table will be defined based on the input supplied by the user. Input to the program will be the interest rate range (2 numbers), an increment, and the range of years to generate for the mortgage table. The program should prompt the user for these values. The output will be a table of these factors, rather there could be multiple tables as each individual table is allowed to be just 8 columns across and as many rows as there are years.
The table values should be printed with 4 digits of accuracy.
A sample session with program could look similar to following.
Monthly Payment Factors used to Compute Monthly Payments
Enter Interest Rate Range and Increment 8.00 16.00 .25
Enter the Year Range 1 20
interest rates
8.00 8.25 8.50 .... 9.25 9.50
1 xxx xxx xxx xxx xxx
years 2 xxx xxx xxx xxx xxx
3 xxx xxx xxx xxx xxx