Example: Periodic Payments
The payment due each year on a 25 year, $100,000 loan is calculated. The loan is at 8%.
using System;
using Imsl.Finance;
public class pmtEx1
{
public static void Main(String[] args)
{
double rate = .08;
int nper = 25;
double pv = 100000.00;
double fv = 0.0;
double pmt = Finance.PeriodicPayment(rate, nper, pv, fv,
Finance.Period.AtEnd);
Console.Out.WriteLine("The payment due each year on the " +
"$100,000 loan is " + pmt.ToString("C"));
}
}
Output
The payment due each year on the $100,000 loan is ($9,367.88)
Link to C# source.