you have just purchased a stereo system that cost 1000dollar on the following cr
ID: 3648763 • Letter: Y
Question
you have just purchased a stereo system that cost 1000dollar on the following credit plan> no down payment, an interest rate of 18% per year (and hence 1,5% per month), and monthly payments of 50 dollar. The monthly payment of 50dollar 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 deducted from your debt, which leaves you with a debt of 965dollar, which is 14,48dollar. Hence, you can deduct 35.52dollar (which is 50dollar=14.48dollar) from the amount you owe. write a program that will tell yoou how many months it will take you to pay off the loan,as well as the total amount of interest paid over the life og the loan. Use a loop to calculate the amount of interest and the zise of the debt after each month.(your final program need not output the monthly amount of interest paid and remaning debt, but you may want to write a preliminary version of the program that does output these values.) use a variable to count the number of loop iterations and hence the number of months until the dbt is zero. you may want to use other variables as well. the last payment may be less than 50dollar, then your monthly payment of 50dollar will not pay off your debt, although it will come close. once month's interest on 50 dollar is only 75 cent.You shall also do the following:
1. The user can enter the price of the system which is the amount of the
loan. You may assume that the amount is < $2500.
2. The interest rate shall depend on the loan amount. If the amount is
$1000 or less the interest rate is 1,5% each month, but else 2,0% each
month.
3. For each payment you shall write the number of the month, interest
paid and remaining dept.
4. Write all amonts with 2 digits.
5. Use comments in the program source. Comment on the purpose of
the program and what you are doing in each program block. Use
descriptive variable names.
.
Example of the output of the program:
Input the cost of the item in $ (the debt): 1000
------------------------------------------------------
Month: 1, Interest paid: 15.00, Remaining debt: 965.00
Month: 2, Interest paid: 14.47, Remaining debt: 929.48
...
------------------------------------------------------
Number of months: xx
Total interest paid: xxx.yy
Explanation / Answer
#include #include using namespace std; int main() { double loan,yrint,mptpd,sumtin; double decint,prince,totalprnce; int month; cout > loan; cout > yrint; cout > mptpd; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.