But I've noticed I'm just repeating them instead of understanding, for example
using System;
class RegPay
{
static void Main()
{
decimal LoanAmount; // loan amount
decimal IntRate; // interest rate as a decimal i.e 0.075
decimal PayPerYear; // payments per year
decimal NumYears; // number of years
decimal Payment; // the regular payment
decimal numer, denom; // work variables
double b, e; // base and exponent for call to pow()
LoanAmount = 69950.00m;
IntRate = 0.0399m;
PayPerYear = 12.0m;
NumYears = 30.0m;
numer = IntRate * LoanAmount / PayPerYear;
e = (double)-(NumYears * PayPerYear);
b = (double)(IntRate / PayPerYear) +1;
denom = 1 - (decimal)Math.Pow(b, e);
Payment = numer / denom;
Console.WriteLine("The payment will be: {0:C}", Payment);
}
}
Do you think instead of trying to memorise the formulas and programs I should just understand what the program is trying to teach me? My book
Quote
C# 3.0 Beginner's Guide
Thanks,
Mike

New Topic/Question
Reply



MultiQuote





|