help with C++ question please

hey guys how you doing ive been given a question to do and i have no clue where to go about it if someone can help me please


Suppose a deposit of certain amount is made to the same bank account each year on 1 July, and the annual interest rate for this account is always 0.08 (8%). Write a C++ program that reads in these yearly deposits, calculates and displays the total accumulated amount of the account on 1 July of the current year. A negative deposit amount or an invalid deposit input will terminate the program input. Hence for a list of deposits such as

1000 (2 years ago deposited on 1 July)
3500.50 (1 year ago deposited on 1 July)

2000 (deposited on this 1 July)

-1 (or control-Z, calculate the accumulation on this 1 July)

the program should produce the accumulated total 6946.94 = 1000*1.082 + 3500.50*1.08 + 2000 or through 6946.94 = (1000 *1.08 + 3500.50) *1.08 + 2000. Draw the flowchart of this C++ program, and desk check the program for the deposit input
Last edited on
i would use a stack function or a queue so that you can store all the numbers then call them back out and calculate them.
hope this helps. sounds the most reasonable to me. now like i said use one of those to store and read back your numbers, then when you have the program get the number back out you can have it do the math then display what your total is. again, hope this helps.
to be honest i have no clue what u just said ? lol i barely dunno how to program thats y
Start with a simple program that adds up the values entered into a variable called something like account_balance. After getting that to work changing it to do the extra required work should be easy for you to figure out.

Tim S.
Topic archived. No new replies allowed.