Question: Problem 3: Write a program to see how your money grows in an investment account. You will enter the initial amount deposited, the interest rate,

 Problem 3: Write a program to see how your money grows

Problem 3: Write a program to see how your money grows in an investment account. You will enter the initial amount deposited, the interest rate, and the number of years the money will remain in the account. Assume no withdrawls are made during this time period display the balance at the end of each year based on the interest rate. Also display the total amount of interest earned. Use loops to validate that the deposit amount, interest rate, and number of years is greater than 0 . Calculate and Sample Output (Test Case l) what is inital dep sit? -1000 Invalid, must be greater than 0. Re-enter 1000 Annual interest rate (as percent) 0 Invalid, must be greater than 0. Re-enter 10 Number of years on deposit?-3 Invalid, must be greater than 0. Re-enter 3 Let's see how your money grows! Year Balance 1 1100.00 1210.00 1331.00 Total interest earned is $ 331.00 Test case 2: $5000 deposited for 10 years at 7% interest Test case 3: $10000 deposited for 20 years at 5% interest

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!