Trying to make a table using a loop.

Thanks..i figured it out...not quite sure how to delete this!
Last edited on
You can add'\n' after ending loan balance
I did that. I am having problems looping the Ending Loan Balance to make it the Beginning Payment and then having the program continue to run.
Hi

how about at the end of the loop:
beginning_payment = ending_payment

Just overwrite the value of the beginning with the current ending.
If you need the starting balance at the end of your programm, then just introduce a new variable and write the amount in there.

Pseudocode would be somtehing like this

1
2
3
4
5
6
7
8
9
enter LOAN
make beginning = loan
loop while(beginning>0)
{
   calculate interest, payment, new balance using beginning as a base
   print out beginning, interest, payment, new balance
   override beginning with new balance
}



int main
Topic archived. No new replies allowed.