代码大全

(singke) #1

Pasal 3.13 0.82 7 4 4 :l
Ada 9.39 2.09 7 8 4 :1


function ComputePayments


Months: integer;
InterestRate real;
real
var
LoanAmount:longint;
begin
for LoanAmount: MIN_LOAN_AMOUNT to MAX_LOAN_AMOUNT do
begin
Payment: LoanAmount
(
(1.0 Power(1.0 (InterestRate 12.0)-Months))
(InterestRate/12.0
);
...
end;
end;


function ComputePayments
(
Months integer;
InterestrRate: real;
): real
var
LoanAmount Iongint;
Divisor:real;
begin
Divisor:= 1.0+(InterestRate/12.0),-Months))/
(InterestRate/12.0);
for LoanAmount:=MIN LOAN AMOUNT to MAX LOAN AMOUNT do
begin
Payment = LoanAmount/Divisor;


...
Free download pdf