If the present value of an account is $1000 and the interest rate is 5%, then after one year, the account will increase by $50 (5% of $1000). In the second year, the interest applies to all $1050, so the account will increase by $52.50 (5% of $1050). Getting future interest on past interest is called compound interest.
A general formula for future value is: Future Value = P*(1 + R/100)Y Where P is the present value, R is the interest rate and Y is the number of years. You need not write the algorithm to compute compound interest because a module for it is available online. It has three inputs - present value, interest rate and number of years - and one output: future value.
Using this module, write an algorithm to print the balance in a savings account at the end of every decade over a 100-year span. Your algorithm is given the initial balance and the interest rate. See the note below about how to draw a "black box" on your homework submission.