Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $ 2.56 10 $ 5.12 The total savings for 10 days is: $ 10.23
ACME Bank’s new Pocket Money Saver account program, encourages school kids to learn the importance of saving money and manage expenses wisely, and you have been asked to design a software tool for rolling out this scheme to its bank customers.
Write a console program, that will calculate the pocket money saved over a period, with one cent at the start of account setup, will double every day. For example, if the opening balance is one cent the first day, it will be two cents the second day, and continues to double each day.
The console program you will write, should ask the user for the number of days, and display a table showing what the saving was for each day, and then show the total savings at the end of the period. The output should be displayed in a dollar amount, not the number of cents.
A successful test run of the program is as shown in the screenshot below:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps