## Introduction

How much money will you have after investing it for several years?

## Design

- All input and output data is in percents, dollars, and years
- Interest is calculated annually at the end of the year
- Ask the user for:
- Annual Interest rate (percent)
- Initial investment amount (dollars)
- Years of investment (years)

- Display the total amount of the investment at the end of investment years

## Calculation

Input

A_{i} // initial investment amount (dollars)
R // annual interest rate (percent converted to decimal)
Y // length of investment (years)
N // number of times the interest is compounded per year

Final amount

A_{f} = A_{i} * (1 + R/N)^{YN}

*Note: Go
here for more information on the calculation*

## Try This

a. Show the accumulated amount for each year.

b. Invest an additional amount at the beginning of each year.

c. In 1626 Peter Minuit bought Manhattan island from the local Indians for a
load of cloth, beads, hatchets, and other odds and ends then worth 60 Dutch guilders
($24 dollars).
If the money ($24) was invested in 1626 at 5% interest per year, what would the
investment be worth today?