Bank account program while loop error

I need to add the ending balance to the new balance for 12 months with a desired interest rate using a loop then print it to the screen sort of like this
month# newbal int endbal
1 4350.00 17.40 4367.40
2 4367.40 17.47 4384.87
3 … … …

Here is my code. Thanks for the help!

1
2
3
4
5
6
7
8
9
10
 while(month < 12)
		{
			month++;
			intrestEarned= accountOne.getAccountBalance() * accountOne.getMonthlyIntRate();
			endingBalance = accountOne.getAccountBalance() + intrestEarned;
		
			cout<<month<<accountOne.getAccountBalance()<<intrestEarned<<endingBalance<<endl;
			

		}
Topic archived. No new replies allowed.