Question: c++ programming please. Write a program that will tell you how many months it will take you to pay off a loan for a purchase

c++ programming please.
Write a program that will tell you how many months it will take you to pay off a loan for a purchase item with no down payment, as well as the total amount of interest paid over the life of the loan. The program should input from the user the amount of loan needed, the interest rate per year, and your monthly payment. Also, the program should tell you how many months it will take you to pay off the loan, as well as the total amount of interest paid over the life of the loan. For example, if you have just purchased a stereo system that cost $1,000 on the following credit plan: no down payment, an interest rate of 18% per year (1.5% per month), and monthly payments of $50 In this example, the monthly payment of $50 is used to pay the interest, and whatever is left is used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1,000 in interest That is $15 in interest. The remaining $35 is deducted from your debt, which leaves you with a debt of $965.00. The next month you pay interest of 1.5% of $965.00, which is $14.48. Hence, you can deduct $35.52 (which is $50 - $14.48) from the amount you owe, The last payment may be less than $50 if the debt is small, but do not forget the interest. If you owe $50, then your monthly payment of $50 will not pay off your debt, although it will come close. One month's interest on $50 is only 75 cents. Note: The program should work for any input values: Sample Running of the Program If the input to your program is: Loon: 1000 Yearly Interest Rate: 18 Monthly payment: 50 Then the Output is: Initial Loan: Monthly Interest: Monthly Payment: 1000 1.50% $50 Month 1 2. Remaining Loan 1000.00 965.00 Amount of Interest per month 15.0000 14.4750 5 7 8 9 10 929.48 893.42 856.82 819.67 781.97 743.70 704.85 665.42 625.40 584.79 543,56 501,71 459.24 416.13 372.37 32795 282.87 13.9421 13.4013 12.8523 12.2951 11.7295 11.1554 10.5728 9.9814 9.3811 8.7718 8.1534 7.5257 12 13 14 15 16 17 18 19 20 21 22 23 24 6.8885 6.2419 5.5855 4.9193 4.2431 3.5567 2 8601 2.1530 1.4353 0.7068 237.11 190.67 143.53 95.68 47.12 Total amount of interest paid: 197.8268
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
