One way to save money is to deposit it in the saving account. This way, you add something to the amount that you deposited. The interest rate usually depends on the amount:
Assignment. Write a program that prompts the user to input the information about the bank:
Example. Suppose that the threshold is $1,000, the smaller interest rate is 0.9%, the larger interest rate is 1.5%, and you invest $1,500. Since in this case, the amount is larger than the threshold, your effective interest rate is 1.5%. This means that in a year, you earn an additional amount of 1,500 * (1.5 / 100) = $22.50. Thus, in a year, your deposit will be equal to $1,500 + $22.50 = $1,522.50.
You should present the results of the computations in a nice and clear form, e.g., as follows:
Report on John Johnson's saving account: Original amount 1500.00 effective interest rate 1.5% amount gained 22.50 current amount 1522.50 Thanks for using our bank!When it is due. The program is due at the beginning of the first lab section on the week of September 29, i.e.: