Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.40 KB | None | 0 0
  1. Problem 9 You have just purchased a stereo system for $1,000 on the following credit
  2. plan: no down payment, an interest rate of 1.5% monthly, and monthly payments of
  3. $50. The monthly payment of $50 is used to pay the interest and whatever is left is
  4. used to pay part of the remaining debt. Hence, the first month you pay 1.5% of $1,000
  5. in interest. That is $15 in interest. So, the remaining $35 is deducted from your debt,
  6. which leaves you with a debt of $965.00. The next month you pay interest of 1.5% on
  7. $965.00, which is $14.48. Hence, you can deduct $35.52 from the amount you owe. Write
  8. a program that will tell you how many months it will take you to pay off the loan, as
  9. well as the total amount of interest paid over the life of the loan. Use a loop to calculate
  10. the amount of interest and the size of the debt after each month. (Your final program
  11. need not output the monthly amount of interest paid and remaining debt, but you may
  12. want to write a preliminary version of the program that does output these values.) Use
  13. a variable to count the number of loop iterations and hence the number of months until
  14. the debt is zero. You may want to use other variables as well. The last payment may
  15. be less than $50. Do not forget the interest on the last payment. If you owe $50, then
  16. your monthly payment of $50 will not pay off your debt, although it will come close. One
  17. month’s interest on $50 is only 67 cents.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement