A savings account typically accrues savings using compound interest. If you deposit $1000 with a 10% interest rate per year, after one year you will have $1100. If you leave this money in the account for another year at 10% interest, you will have $1210. After three years you will have $1331, and so on.
Write a program that inputs the initial amount, an interest rate per year, and the number of years the money will accrue compound interest. Write a recursive function that calculates the amount of money that will be in the savings account using the input information.
To verify your function, the amount should be equal to P(1+i)n, where P is the amount initially saved, i is the interest rate per year, and n is the number of years.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.