Stock Market Simulator / Comp. Interest Calculator
#include <iostream> #include <cmath> using namespace std; int main() { float a; float p = 100 0; float r = .01; for(int day = 1; day <= 30; day++){ a = p * pow(1+r, day); cout << day << " -------- " << a << endl; } }