General Home About Educational Kean University MSAS5004 Intro to Programming MSAS5040 Intro to e-Business MSAS5104 Intro to Programming MSAS5302 Decision Support Systems MSAS5599 Web Site Design Caldwell College CS115 Intro to Computers CS185 Intro to Programming Business Recycled Fiber Apparel Little Jammies Tie Dye Mania Just Neon Tees No Buttons Required Panda Apparel LLC Betty Boop Gear Panda Imprinting Custom Printed Boxers Custom Printed Lounge Pants Panda Formals DSM Internet Services

## Assignment 2

### Calculate the interest

Assume you are trying to calculate the cost of buying a car. The cost of the car is \$14,800. You made a trade of your old car to the dealer for \$1,600 and put down a down payment of \$3,000. You will pay off the balance over the next four years by means of a loan which charges 10% simple interest.

Your assignment is to calculate the total amount of money (balance plus interest) you will need over the next four years to pay off the loan and the monthly payment. Use the following formula to calculate the interest:

I = Prt

Where "I" is the simple interest, "P" is the principle, "r" is the interest rate and "t" is the time in years.

To calculate the monthly payment, use the following formula:

P = T / (t * 12)

Where "P" is the monthly payment, "T" is the loan total including interest and "t" is the loan duration in years.

The homework is to implement the algorithm as described above. The program should output the amount of interest on the loan, the total amount of the loan and the monthly payment.

• none

### Output:

The loan principle is: principle
The total interest is: total interest
The loan total is: loan total
The monthly payment is: monthly payment

### Turn in:

1. Program listing
2. Program output