23 - Making a Stock Market Simul
2018-01-01 本文已影响0人
社交帐号直接注册
#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;
}
}