Program that calculates the balance of a savings account

2. Write a program that calculates the balance of a savings account at the end of a user-defined period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established.

A loop should then iterate once for every month, performing the following:

Ask the user for the amount withdrawn from the account during the month.

(Do not accept negative numbers.) This amount should be subtracted from the balance.

B.Calculate the monthly interest. The monthly interest rate is the annual interest rate divided by twelve. Multiply the monthly interest rate by the balance and add the result to the balance.

C. After the last iteration, the program should display the ending balance the total amount of deposits, the total amount of withdrawals, and the total interest earned.

use switch and case structure