Problem #8


The Money Store


A CD (certificate of deposit) can be purchased as an investment subject to certain conditions. CDs sell for a fixed amount, the principal money may not be removed until a given time has expired (this is called “reaching maturity”) and there is a guaranteed rate of return (interest paid).

Create a program that allows the user to purchase one of three different CDs. When the user has chosen the CD to purchase, the program outputs the amount of the principal, the time until maturity and the value of the CD at maturity.

The three CDs have these properties:


CD #1: principal of $5,000
matures in 6 months

returns a fixed rate of interest of 1%


CD#2: principal of $10,000
matures in 12 months

returns an interest rate of 2% compounded monthly


CD#3: principal of $15,000
matures in 24 months

returns an interest rate of 3% compounded daily (use the 360 day accounting year)