![]() |
To calculate the monthly payment M for a loan with a principle amount of P taken out for N years at an interest rate of J, the formula is: M=P*(J/(1-Pow(1+J,-N))). Let's say you need to enter the principle, years, and interest rate dynamically. That is, prompt for the values as they are needed. We can use the Inp() built in function to perform this assigning the results of the input to a variable and then using that variable in the resulting expression that returns the result of the amortization Pull down the Program Functions menu item and enter the formula as shown to the left. The program starts out with a curly brace to group the statements together. All statements within a curly brace must end with a semi-colon. Call the function Amortize. Function names can be up to 8 characters long and must start with an alphabetic but may contain numerics. because this formula uses the Pow function, you must have MathLib installed for it to function. Also, because fractional values are used (Interest rate) you must be in floating point mode when the program executes |
![]() |
To execute the program, hit the ? button on the calculator and enter the name of the program Amortize. Case matters unless you turned that option off. You could also assign the program to a key, see the section on key re-programming for details |
![]() |
You will be prompted for Principle (in dollars), Years, and Interest (1-100) and finally the result of the program, the monthly payment for the loan will be displayed on the calculator |