Jun 25, 2018 at 1:32am UTC  
Hello,
 
Jun 25, 2018 at 1:55am UTC  
This looks like it'd be someone's homework.
That being said, they already told you everything you need to know. You have your equations, your inputs, your outputs, and even the methodology.
To state it simply, you need to create a function which does the math you need and returns the result.
1
float  getInterest(float  initVal, float  interestRate);
int  main()
{
    float  InterestRate = .01;
    float  CurrentBalance = 1000.0;
    int  nMonths = 12;
    for (int  x = 0; x < nMonths; x++)
        {
            CurrentBalance = CurrentBalance + getInterest(CurrentBalance, InterestRate);
        }
    return  0;
}
float  getInterest(float  initVal, float  interestRate)
{
    return  initVal*InterestRate;
}
Something like that, if you need to use inputs, then you'd probably be using cin and cout. You'd need to modify the equations or inputs depending on the specifics, but it's literally all there for you.
Last edited on Jun 25, 2018 at 1:57am UTC