The mathematical formula for the total amount of the money invested with the interest compounded
annually is
y = p(1 + r )n
where y is the total amount, p the principal invested, r the interest rate, and n the number of years. Write
a program to calculate the total amount of the money after 30 years for the invested principal of $10,000
with an 8 percent interest rate.