Question: Write an HTML document that looks similar to Write four functions with these headers: function doPayment() function doBalance() function computePayment(principal, annualRate, years, periodsPerYear) function computeBalance(principal,
Write an HTML document that looks similar to
Write four functions with these headers:
function doPayment() function doBalance() function computePayment(principal, annualRate, years, periodsPerYear) function computeBalance(principal, annualRate, years, periodsPerYear, numberOfPaymentsPaidToDate)
The first two functions (doPayment and doBalance)
take no parameters
are called from an onclick attribute
get input from the user
call the computePayment or the computeBalance function
display a result to the user
The computePayment function computes and returns the monthly payment for a loan with a fixed annual interest rate.
The computeBalance function computes and returns the balance for a loan with a fixed annual interest rate.
Loan Calculator x 9 file:///C/Users/rab29/Dropbox/books/handboola * Loan Calculator Amount borrowed (principal) Annual interest rate (example: .065) Number of years Payments per year Compute payment Number of payments paid to date 80000 0.05 30 12 $429.46 180 $54306.40 Compute payoff amount Reset
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
