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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started