Asked by ayeshhs
Assume you start with $100 in a saving account that earns 12% per year. The monthly interest rate is 12%/12 = .12/12 = .01. After the first month there is 100 + (.01)*100 in the account = 101
After the second month there is:
101 + (.01)* (101) = 102.01
Thus each month is adding .01 times previous month to previous month value as new saving value.
Write a program that reads in initial saving value (make it $100) and reads in interest rate (make it .12) per year and then figures out how much will be in the account after 4 months.
After the second month there is:
101 + (.01)* (101) = 102.01
Thus each month is adding .01 times previous month to previous month value as new saving value.
Write a program that reads in initial saving value (make it $100) and reads in interest rate (make it .12) per year and then figures out how much will be in the account after 4 months.
Answers
Answered by
Steve
read amount
read rate
mrate = rate/12.0
bal = amount * (1+mrate)^4
that last expression might vary, depending on the language:
(1+mrate)**4
pow(1+mrate,4)
read rate
mrate = rate/12.0
bal = amount * (1+mrate)^4
that last expression might vary, depending on the language:
(1+mrate)**4
pow(1+mrate,4)
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.