I need to develop a c++ program that will provide the payoff table for a revolving credit card. The user should be prompted for the amount of the loan, annual interest rate, and amount to be paid each month. The output should be a formatted list showing the month number, amount paid on the principal, amount paid on the interest, and the remaining amount of the loan.
The calculations should be done within a while loop that will run as long as the balance is greater than zero. This is the part that's giving me trouble. I just don't know what to put inside the loop or how to make it repeat.
Given calculations:
interest = balance * (rate/12)
principal = payment - interest
new balance = balance - principal
I removed the cin lines, and included the calculations within the loop but now I seem to be stuck in an infinite loop. The only value that changes is month, everything else only calculates once.