[SOLVED] SOLVED: mortgage

15.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

This program will allow the user to enter the principal amount that they’re borrowing,
the interest rate, and the length in years. Then, it will print a mortgage loan payoff table.
Algorithm:
1) Input principal (the amount borrowed)
2) Input interest (the interest rate annually)
3) Input lengthYears (the number of years of the loan)
4) Calculate the monthlyPayment using the formula provided below
monthlyPayment = principal * (decimalInterest / (1 – (1 + decimalInterest)^(-lengthMonths)))
5) Compute the monthlyInterest by multiplying principal by the decimalInterest
6) Compute the monthlyPrincipal by taking monthlyPayment and subtract monthlyInterest
7) Compute the newBalance by taking the principal and subtract monthlyPrincipal
8) Make the newBalance become the principal
9) Loop step 5 through 8 until principal is 0
10) Prompt the user if they want to repeat back to step 1, so nested loop
11) If they press Y, clear the screen and go back to step 1. If they press N, exit the loop.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.