Question: QUESTION Write a C++ program to help a prospective borrower calculate the monthly payment for a loan. The program also prints the amortization (payoff) table

 QUESTION Write a C++ program to help a prospective borrower calculate

QUESTION Write a C++ program to help a prospective borrower calculate the monthly payment for a loan. The program also prints the amortization (payoff) table to show the balance of the loan after monthly payment The program prompts the user for input as shown in the following example: C++ with comment // Amount of the loan (principal) ? 10000.00 Interest rate per year (percent) ? 12 Number of years? 10 The program then creates an information summary and amortization table. Banks and financial institutions use different formulas to calculate the monthly payment of a loan. For the purpose of this project, we use the following simple formula: NM = (NY 12) IM = (IY/12) P = (1+IM) Q = (P/(P-1)) MP =( PRIMO) Where, NY Scheduled number of years to amortize the loan NM Scheduled number of months for the loan IY Interest rate per year (as a percentage) IM Interest rate/month (decimal) PR : Principal (the amount of the loan) : The value of (1+IM) Q : The value of PHP-1) MP Monthly payment Because of the approximation used in calculation the value of the new balance at the end of the last month may become nonzero. To prevent this the last payment must be adjusted. Therefore, we will print the information for every month except the last month. After we exit the loop, we then print the information for the last month. The monthly payment for the last month may be less or greater than for that month. The new balance at the end of the last month must be zero. The following example shows the concept. The program has been run for a loan of RM5.000,00 at 11% interest rate for a period of one year. The input was Amount of the loan (principal) > 5000.00 Interest rate per year (percent)? 11 Number of years? 1 The sample output is shown below: P Amount of the loan (principal): 5000.00 Interest rate/year (percent): 11.0 Interest rate/month (decimal): 0.009167 Number of years: 1 Number of months 12 Monthly payment: 441.91 old Monthly Interest Principal Month Balance Payment Paid Paid Balance 15000.00 24603.92 34204.21 4 3800.84 5 3393.77 62982.97 7 2568.40 2150.03 9 1727.83 10 1301.76 11 871.78 12 437.86 441.91 441.91 441.91 441.91 441.92 441.91 42.20 38.54 34.84 31.11 27.36 23.54 19.71 15.84 11.93 7.99 4.01 396.08 399.71 403.37 407.07 410.80 414.57 418.37 422.20 426.02 429.98 433.92 437.86 4603.92 4204.21 3800.84 3393.77 2982.97 2558.40 2150.03 1727.83 1301.76 871.78 437.85 0.00 441.92 441.91 441.91 441.87 Total amount paid: 5302.88

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!