Explore BrainMass

C++ program to create Monthly Payment Factor Tables

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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

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

© BrainMass Inc. brainmass.com March 21, 2019, 8:32 pm ad1c9bdddf

Solution Summary

Attached code has been tested in Unix/Linux environment using GNU C++ compiler "g++".