Question: Compound interest is interest calculated on both the principal amount and the accumulated interest. The total amount accumulated after period k is computed as: A_k

Compound interest is interest calculated on both the principal amount and the accumulated interest. The total amount accumulated after period k is computed as: A_k = (1 + p)*(A_k - 1) + d Where: p is the interest percentage earned every period for example 0.03 for 3% interest d is the amount deposited every period A_k - 1 is the total amount accumulated after the k - 1th period A_0 is the initial deposited amount Write a recursive function that takes as input the interest percentage, the initial and periodical deposit amounts, and the period number and returns the amount accumulated by the given period. Write a program compound Interest. c that asks the user to enter values for the initial deposit, the regular deposit, the interest percentage and the period number and uses the function above to print out the corresponding accumulated amount after the given period
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
