The Manhattan Island Problem

Programming Assignment

 

In 1626, as the story goes, Peter Minuit "bought" Manhattan Island from the "Manhattan Indians" for trinkets worth the equivalent of about $24.00. Suppose that the Manhattanites had invested their money at 4% interest compounded annually. How much would their investment be worth today?

Compute compound interest each year, but display the values of the investment at twenty year intervals only, starting with 1626.


(a) Having trouble?  Start small. First write a program that outputs the total amount each year, compounded annually, for 10 years.

(b) How to use the code in part (a) in the full program?