#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float a;
float p=10000;
float r=.03;
for(int day=1; day<=30; day++)
{
a=p*pow(1+r,day);
cout << day << "----" << a << endl;
}
}
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float a;
float p=10000;
float r=.03;
for(int day=1; day<=30; day++)
{
a=p*pow(1+r,day);
cout << day << "----" << a << endl;
}
}
本文标题:23 - Making a Stock Market Simul
本文链接:https://www.haomeiwen.com/subject/uqzzgxtx.html
网友评论