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;

    }

}


Comments

Popular posts from this blog

Hackerearth Pr1.

Avg age of any no. of ppl for loop

Random Number