/**
Computes the value of an investment with compound interest.
@param intial_balance the initial value of the investment
@param p the interest rate pre period in percent
@param n the number of periods the investment is held
@return the balance after n periods
*/
double future_value(double initial_balance, double p, int n)
{
double b = initial_balance * pow(1 + p / 100, n);
return b;
}