Calculating the island of Manhattan gains after 400 years.

  • Thread starter Thread starter lcam2
  • Start date Start date
  • Tags Tags
    Years
Click For Summary
SUMMARY

The discussion focuses on calculating the financial gains from the historical purchase of Manhattan in 1626 for $24, assuming the amount was invested at a 5% simple interest rate. A C++ program is provided to compute the total amount every 50 years up to 2026. Key issues identified include incorrect incrementing of the total money variable and the suggestion to use an integer for the year variable to avoid decimal artifacts. Additionally, a comparison with compound interest reveals that the investment would yield over $7 billion by 2026.

PREREQUISITES
  • C++ programming fundamentals
  • Understanding of simple interest calculations
  • Basic knowledge of data types in C++ (e.g., float vs. int)
  • Familiarity with output formatting in C++
NEXT STEPS
  • Implement a C++ program to calculate compound interest
  • Explore C++ data types and their implications on calculations
  • Learn about financial modeling and investment calculations
  • Investigate the historical context of the Manhattan purchase and its economic implications
USEFUL FOR

Students in finance or programming courses, C++ developers interested in financial calculations, and anyone studying the economic history of Manhattan.

lcam2
Messages
28
Reaction score
0
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 %
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.



Homework Equations



simple Interest = Principal amount * Interest rate * years



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;

count << " Year Interest gained Total Money" << endl;
count << "-----------------------------------------------"<< endl;
count << endl;




while( year <= 2026)
{


interest = 24 * .05* 50;
totMoney = 24 + interest;


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

count << endl;

totMoney ++;

year += 50;


}




return 0;
}
 
Physics news on Phys.org
The basic algorithm looks all right (I'd clean up the output format a little, but that's just me). However, is there a reason you're incrementing totMoney (totMoney++)? Does the legend include a $1 payment every 50 years?

I'd also suggest using an int for year--you won't have any decimal artifacts in the year field.

EDIT: And now compare it with compound interest--by 2026, that $24 would have turned into $7,176,800,429.97.
 
Last edited:

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 15 ·
Replies
15
Views
20K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 156 ·
6
Replies
156
Views
40K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K