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, 21.06.2019 20:20
Sometimes writers elaborate on the truth when recalling past events so they can enhance their narrative essay with more interesting descriptions. do you feel that published writers should or should not embellish real life events just to make their stories more interesting?
Answers: 2
question
Computers and Technology, 22.06.2019 06:20
In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server or network availability confidentiality integrity identity automated attack software? those who wrongfully disclose individually identifiable health information can be fined up to what amount per calendar year? single most expensive malicious attack hipaa what are script kiddies? advanced persistent threat security manager security engineer what level of security access should a computer user have to do their job what process describes using technology as a basis for controlling the access and usage of sensitive data? cybercriminal
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
You know the right answer?
Enhance your program from exercise 20 by first telling the user the minimum monthly payment and then...
Questions
question
Biology, 10.03.2021 08:00
question
Mathematics, 10.03.2021 08:00
question
Mathematics, 10.03.2021 08:00
question
Mathematics, 10.03.2021 08:00
question
French, 10.03.2021 08:00
Questions on the website: 13722363