....that l don't know the answer.

Ok some one borrows a principle of 10,000 at 10% compound interest. Their first payment is 500, hence the balance after the first payment would be 10,000 + (0.10 * 12) - 500.

OK so far so easy. The problem l am having is expressing the formula in a procedure, so that l can show payments and remaining principle over 1 year, 2 years etc.

Some one stop me from hitting my head against my desk.