I need help!
The errors I got
error: INTEREST_PER_YEAR not declared
error: PAYMENTS_PER_YEAR not declared
error: intPerPayment not declared
Here is the code in Visual Web Devoloper 2005 Express
Code:
'Create variables to hold the values entered by the user
Dim P As Double = loanAmount.Text
Dim r As Double = rate.Text / 100
Dim t As Double = mortgageLength.Text
Dim ratePerPeriod As Double
ratePerPeriod = r / INTEREST_PER_YEAR
Dim payPeriods As Integer
payPeriods = t * PAYMENTS_PER_YEAR
Dim annualRate As Double
annualRate = Math.Exp(INTERESt_CALCS_PER_YEAR * Math.Log(1 + ratePerPeriod)) - 1
Dim intPerPayment As Double
intPerPayment = (Math.Exp(Math.Log(annualRate + 1) / payPeriods) - 1) * payPeriods
'Now compute the total cost of the loan
Dim intPerMonth As Double = intPerPayment / PAYMENTS_PER_YEAR
Dim costPerMonth As Double
costPerMonth = P * intPerMonth / (1 - Math.Pow(interPerMonth + 1, -payPeriods))