Well I have been trying this problem for over 10 hours and have no idea how to do this problem, here it is:
Imagine that you are a proud new parent. You decide to start a college
savings plan for your child, hoping to have enough in 18 years.
Suppose that your folks give you $1000 to get started and that each
month you can contribute $100. Suppose also that the interest rate is
6% per year compounded monthly, which is equivalent to 0.5% each
month. Because of interest payments and your contribution, each month
your balance will increase in accordance with the formula:New Balance = Old Balance + interest + your contributionUse a for loop to find the amount in the savings account each month
for the next 18 years. (Create a vector of values.) Plot the amount in
the account as a function of time.
The part that I am stuck on is how to make the new balance get plugged back into the equation 216 times (for 18 years). I am able to get the first monthly balance but don’t know how to make the loop continue for the remaining 215 months.
Any tips? Thanks!
Did you mean something like this: