Question: Write a program in java to do the following. Assume that at the start of year 1, a person deposits 1000 into a savings account.

Write a program in java to do the following. Assume that at the start of year 1, a person deposits 1000 into a savings account. At the end of the year, the bank adds 5% interest to the amount on deposit, giving 1050. At the end of the second year, the bank adds another 5% of the amount that has been on deposit, making the account 1102.50. This continues for 20 years. Write a program which uses a loop to calculate the year number (1, 2, .., 20) and the account amount for each year. The program should print the year number and the amount at the end of that year for each of the 20 years.

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!