Question: Problem 2 . Write a program that prompts the user to enter the amount of money they want to deposit on the first of each

Problem 2. Write a program that prompts the user to enter the amount of money they want to deposit on the first of each month. Interest for each month is calculated and paid based on the account balance at the end of the month. Using printf, print out the account balance to two decimal places. Assume the yearly interest rate is 5%. Please declare a constant for the monthly interest rate as follows in your program:
final double MONTHLY_RATE =.05/12;
The following are how to calculate the account value at the end of each month:
month1Value: monthySaving *(1+MONTHLY_RATE)
month2Value: (monthly1Value + monthlySaving)*(1+MONTHLY_RATE)
month3Value: (monthly2Value + monthlySaving)*(1+MONTHLY_RATE)
and so on.

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 Programming Questions!