subject

Enhance your program from exercise 20 by first telling the user the minimum monthly payment and then prompting theuser to enter the monthly payment. your last payment might be more than the remaining loan amount and interest on it. in this case, output the loan amount before the last payment and the actual amount of the last payment. also, output thetotal interest paid. reference: when you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodicpayments over a certain period of time. of course, the lending company will charge interest on the loan. every periodicpayment consists of the interest on the loan and the payment toward the principal amount. to be specific, suppose thatyou borrow 51000 at the interest rate of 7.2% per year and the payments are monthly. suppose that your monthlypayment is 525. now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12: 0.6%. the first month‘s interest on 51000 is 1000 x 0.006 = 6. because the payment is $25 and interest for the first monthis $6, the payment toward the principal amount is 25 — 6 = 19. this means after making the first payment, the loan amountis 1000 — 19 = 981. for the second payment, the interest is calculated on 5981. so the interest for the second month is 981x 0.006 = 5.886, that is, approximately 55.89. this implies that the payment toward the principal is 25 — 5.89: 19.11 and theremaining balance after the second payment is 981 — 19.11 = 961.89. this process is repeated until the loan is paid. write aprogram that accepts as input the loan amount, the interest rate per year, and the monthly payment. [enter the interestrate as a percentage. for example, if the interest rate is 7.2% per year, then enter 7.2) the program then outputs thenumber of months it would take to repay the loan. (note that if the monthly payment is less than the first month's interest, then after each payment, the loan amount will increase. in this case, the program must warn the borrower that themonthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
How can a broadcast station be received through cable and satellite systems?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
When you interpret the behavior of others according to your experiences and understanding of the world your evaluation is
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
You know the right answer?
Enhance your program from exercise 20 by first telling the user the minimum monthly payment and then...
Questions
question
Physics, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
SAT, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
question
Arts, 18.10.2020 14:01
question
Mathematics, 18.10.2020 14:01
Questions on the website: 13722361