I have got an exercise about compound interest.
Year 1 is 1000 § deposit in the bank.
At the end of the year the deposit is increased with an interst of
4.5%.
Year 2 The balance is now 1045 § + 1000 * 4.5%
Year 3 2137.07 * 4.5 %
Year 4 2233.24
How do I write this i Java