Question: Write a well-documented (commented) program that computes annual compound interest. The formula for annual compound interest, including principal sum, is: A = P (1 +

Write a well-documented (commented) program that computes annual compound interest. The formula for annual compound interest, including principal sum, is: A = P (1 + r/n)(nt) where:

A = the future value of the investment/loan, including interest

P = the principal investment amount (the initial deposit or loan amount)

r = the annual interest rate (decimal)

n = the number of times that interest is compounded per year

t = the number of years the money is invested or borrowed for

A sample run would be as follows.

Enter amount of loan: 10000 Enter annual interest rate (%): 5.2 Enter number of times that interest is compounded per year: 4 Enter the number of years the money is invested or borrowed for: 10 The principal amount would grow to $16,764.01.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!