Generation

generate functionMon, 30 Sep 2024

Write a program that lets the user enter the double loan amount and loan period in number of years (int) and displays the monthly and total payments for each interest rate starting from 5% to 8%, with an increment of 1/8. Loan amount: 10000.00 Number of years: 5 Interest Rate Monthly Payment Total Payment 5.000% 188.71 11322.74 5.125% 189.28 11357.13 5.250% 189.85 11391.59 ... 7.875% 202.16 12129.97 8.000% 202.76 12165.83

ript function loan(loanAmount, loanPeriod, interestRate) { var monthlyPayment = (loanAmount * interestRate) / (1 - (Math.pow(1 + interestRate, -loanPeriod))); return monthlyPayment; } // JavaScript function loan(loanAmount, loanPeriod, interestRate) { var monthlyPayment = (loanAmount * interestRate

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant