I am starting out with cpp and having trouble to solve this problem I know that it needs a loop but I cannot seem to understand the structure.
If interest is compounded annually, it grows as follows. Suppose P0 is the initial amount and INT is the interest rate per year. If P1 and P2, and P3 is the balance at the end of the first, second , and third year respectively, then:
When money is deposited in an IRA account, it is usually sheltered from taxes. until the money is withdrawn after the age of 59. If someone opened account on their sixteenth birthday at 10% interest, On their sixtieth birthday they look at the account, The money has compounded annually at the 10% rate. program should read in an initial amount and compute the total amount in the account on their sixtieth birthday.
If they decide to leave the money in for another year. Starting from their sixty-first birthday, they decide to withdraw each year’s interest income. In other words, you withdraw the interest and leave the rest of the money untouched. How much income for the rest of your life would you have?
The output could be
initial investment amount
number of years invested up through your sixtieth birthday
interest accumulated as of their sixtieth birthday
total value of the investment on their sixty-first birthday
and amount of income per year after their sixty-first birthday