According to the legend, the island of Manhattan was purcased from the native indian population in 1626 for 24 dollars. Assuming this money was invested in a Dutch bank paying 5 %(adsbygoogle = window.adsbygoogle || []).push({});

simple interest per year, costruct a table in C++ showing how much money the native population would have at the end of each 50- year period, starting in 1626 and ending 400 years latter.

I'm having problems when i try to calculate the total amount of money every 50 year period.

Thanks in advance.

2. Relevant equations

simple Interest = Principal amount * Interest rate * years

3. The attempt at a solution

#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;

int main ()

{

float year;

double rate, interest, totMoney;

year = 1626;

rate = .05;

cout << " Year Interest gained Total Money" << endl;

cout << "-----------------------------------------------"<< endl;

cout << endl;

while( year <= 2026)

{

interest = 24 * .05* 50;

totMoney = 24 + interest;

cout << setw(7) << year << setw(15) << interest << setw(15)<< totMoney << endl;

cout << endl;

totMoney ++;

year += 50;

}

return 0;

}

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculating the island of Manhattan gains after 400 years.

**Physics Forums | Science Articles, Homework Help, Discussion**