5.29 (Peter Minuit Problem) Legend has it that, in 1626, Peter Minuit purchased
ID: 3622366 • Letter: 5
Question
5.29 (Peter Minuit Problem) Legend has it that, in 1626, Peter Minuit purchased Manhattan Island for $24.00 in barter. Did he make a good investment? To answer this question, modify the compound interest program of Fig. 5.6 to begin with a principal of $24.00 and to calculate the amount of interest on deposit if that money had been kept on deposit until this year (e.g., 384 years through 2010). Place the for loop that performs the compound interest calculation in an outer for loop that varies the interest rate from 5% to 10% to observe the wonders of compound interest. Please use setw, setprecision and any other built in functions to make your output readable.amount = principal * pow(1.0 + rate, year)