Question

In: Computer Science

You have just purchased a stereo system that cost $1,000 on the following credit plan: no...

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 (and hence 1.5% per month), and monthly payments of $50. 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. So, 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. Write a program that tells 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. Use a loop to calculate the amount of interest and the size of the debt after each month. (Your final program need not output the monthly amount of interest paid and remaining 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 debt is zero. You may want to use other variables as well. The last payment may be less than $50 if the debt is small, but do not forget the interest. If you owe $50, 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.

Solutions

Expert Solution

//C++ program

#include<iostream>
using namespace std;
int main(){
   double price = 1000,current_interest;
   double interest_rate = 1.5;
   double total_interest=0;
   int month=0;
   do{
       current_interest = price*interest_rate/100;
       total_interest+=current_interest;
       price+=current_interest;
      
       if(price>50)price-=50;
       else price=0;
       month++;
       cout<<"Month : "<<month<<" price : $"<<price<<"\n";
      
   }while(price>0);
  
   cout<<"Total month needed : "<<month<<"\n";
   cout<<"Total Interest : $"<<total_interest<<"\n";
  
   return 0;
}

//sample output


Related Solutions

Module 6 Project A: Stereo Payment Calculator You have just purchased a stereo system that cost...
Module 6 Project A: Stereo Payment Calculator 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 (and hence 1.5% per month), and monthly payments of $50. The monthly payment of $50 is used to pay the interest and whatever is left is used to pay part of the remaining debt. Debt0= 1000 Interestn = Debtn*0.015 Principaln = 50 - Interestn Debtn+1 = Debtn -...
Suppose that you plan to have the following investments: $1,000 annually on your
Suppose that you plan to have the following investments:$1,000 annually on your 23rd through 30th birthdays -- a total of eight investments. Also, suppose that the interest rate for the year between your 23rd and 24th birthdays is expected to be 4.0% per annum and that this rate will increase by 0.25% each year thereafter until your 31st birthday.a. How much would you have on your 31st birthday?b. What single rate, compounded annually, from your 23rd through 31st birthdays would...
You have just purchased a 15 year, ​$1,000 par value US Government bond for​ $909.20. The...
You have just purchased a 15 year, ​$1,000 par value US Government bond for​ $909.20. The yield to maturity on the bond is​ 8.6%. What is the coupon​ rate? A. ​9.0% B. ​7.0% C. ​8.6% D. ​7.5% E. ​15.0%
13. You have just turned 50 and you plan to save for retirement. You plan to...
13. You have just turned 50 and you plan to save for retirement. You plan to retire in 12 years. Once you retire you would like to have an income of $50,000 per year for the next 12 years. Determine the amount you must deposit at the beginning of each year to finance your retirement income. Use the following assumptions to determine this annual deposit: a. All savings compound at a rate of 5% per year. b. You make the...
You just bought a TV for $600 on credit card. You plan to pay back of $50 a month for this credit card debt.
You just bought a TV for $600 on credit card. You plan to pay back of $50 a month for this credit card debt. The credit card charges you 12% of interest rate on the monthly basis. So how long does it take to pay back your credit card debt? A. 11.78 month B. 11.43 month C. 12.91 month D. 12.85 month
Sam's Stereo  is offering a Hi-Fi system for $2,700. The credit terms are 60 months at $73.00...
Sam's Stereo  is offering a Hi-Fi system for $2,700. The credit terms are 60 months at $73.00 per month. What is the interest rate on this offer? A) 20.97 percent B) 20.05 percent C) 21.75 percent D) 19.26 percent E) 1.75 percent
How would you isolate just one stereo-isomer of Emixustat?
How would you isolate just one stereo-isomer of Emixustat?
You just purchased a $1,000 par bond with a 6% semi-annual coupon and 15 years to...
You just purchased a $1,000 par bond with a 6% semi-annual coupon and 15 years to maturity at par. You are hoping that interest rates fall and that you will be able to sell the bond in seven years at a price $1,200. What will the yield to maturity of the bond have to be to get the price you want in seven years? A. 3.15% B. 4.19% C. 4.55% D. 1.57%
i) You just purchased a 10-year semi-annual coupon bond with a par value of $1,000 and...
i) You just purchased a 10-year semi-annual coupon bond with a par value of $1,000 and a coupon rate of 8%. The nominal yield to maturity is 7% per annum. Calculate the market price of the bond. ii)Three years later, immediately after receiving the sixth coupon payment, you sell the bond to your best friend. Your best friend’s nominal yield to maturity is 9% per annum. Calculate the price paid by your best friend.
. You have a $28,000 balance on your credit card. You plan to make monthly payments...
. You have a $28,000 balance on your credit card. You plan to make monthly payments of $550 until the balance is paid off. The interest rate on your credit card is 19.5% p.a., compounded monthly. A letter in the mail informs you that you are approved for a new credit card and balance transfers are subject to a 8.5% p.a., compounded monthly. How many months sooner will you pay off your bill?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT