10
function ComputePayment
(
LoanAmount :Longint;
Months :integer;
InterestRate :real;
):real;
begin
payment =LoanAmount/
(
(1.0-Power(1.0+(InterestRate/12.0),Months))/
(InterestRate/12.0)
)
end;
LoanAmount InterestRate 5
20 0.25% 61 Months 12 72
61 LoanAmount $1000 $10,000
LoanAmount
InterestRate Months LoanAmount
function ComputePayment
(
LoanAmount :longint;
Months :integer;
InterestRate :real;
):real;
var
InterstIdex:Integer;
begin
lnerestldx:=
Round((InterestRate-LOWEST_RATE)GRANULARITY 100.00);
payment:=LoanAmount/LoanDivsor[InterstIdx Months]
end;
:
LoanDivisor
0