Bank interest calculator:

Use a const double for the interest rate.

Interest  rate is 2.0%

Min deposit is $1,000. Max deposit $50,000.

Min years is 2. Max years is 5.

Ask the user how much they want to deposit and how many years they want to deposit for.

Check the values to make sure they are valid.

Display a chart showing the interest earned and the ending balance.

Year                       Starting                                Interest                                Ending

1                              $1000                                    $20                                         $1020

2                              $1020   

3

4

5

 

These numbers are only for example purposes.

Please test for numbers under a 1,000 and over 50,000. Check for years under 2 and over 5.