Code: Select all
#include <iostream>
using namespace std;
int main()
{
double x = 0;
for (int i =0; i<125;i++)
{
x = x + (10000000/(i+1));
cout << "Nach dem " << i << " Durchlauf hat er " << x << " eingenommen \n";
}
for (int i =0; i<11;i++)
{
x = x + (10000000*(i+1));
cout << "Nach dem " << i << " Durchlauf hat er " << x << " eingenommen \n";
}
return 0;
}
At the end this program calculated Malivox capital to 714095000gp.
I think there must be at least one bug in the code but at the moment I can't found them.
[sorry for my bad english, i am still learning the language]