Question: In java (for java intro) 1. Suppose you save $100 (double monthlyDeposit) each month into a savings account with an annual interest rate of 5%.
1. Suppose you save $100 (double monthlyDeposit) each month into a savings account with an annual interest rate of 5%. Thus the monthly interest rate (double monthlyIntRate) is 0.05/12 0.00417 After the first month, the value of the account (double monthlyValue initialzed to 0) becomes (100 0(1+.000417) which equals 100.417 After the second month, the value in the account becomes (100 100.417) *(1+0.00417) which equals 201.252 or (value at the end of first month) *(1+ monthlyIntRate) After the third month the account now contains (100 + 201.252) *(1+0.00417) which equals 302.507 or (value at the end of second month) *(1+ monthlyIntRate) and so on Write a program that prompts the user to enter a monthly savings amount (could contain cents) and prints the value of the account at the end of each month up to and including the 6th month DO NOT compute the value of the account for each month on paper and then plug it into the program. The program follows the following pattern: (monthlyDeposit monthlWalue) * (1 monthlyIntRate) 2. Using the same code as above, change the monthly deposit to $200.50 and interest rate to 3.75% and run the above program Remember to print the header in the format described in Lab2. Comment your code meaningfully
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
