Question: Create a program that will allow a user to enter a loan amount and the number of years that they will borrow the money. Create
Create a program that will allow a user to enter a loan amount and the number of years that they will borrow the money. Create a table of output that will display the interest rate, monthly payment, and total payment of the loan. The first interest rate will be 5% and the last will be 8%. The rate will change by .125% for each increment. Use a counter controlled loop to change the annual interest rate. Round money values to 2 decimal places.
You need these 2 formulas:
- monthlyPayment = loanAmount * montlyInterestRate / (1 - 1 / Math.pow(1 + montlyInterestRate, numYears * 12));
- totalPayment = montlyPayment * numYears * 12;
Sample run:
Interest Rate Monthly Payment Total Payment
5.000% $188.71 $11311.74
5.125% $189.29 $11357.13
..
8.000% $2.02.76 $12165.84
Use Netbeans
ehen (Financial application: compare loans with various interest rates) Write a program displays the monthly and total payments for each interest rate starting from 5% to that lets the user enter the loan amount and loan period in number of years, and with an increment of 1/8. Here is a sample run Enter Enter Total Payment Loan Amount: 10000 Number of Years: 5 Interest Rate Monthly Payment 5.000% 188.71 5.125% 189.29 5.250% 189.86 11322.74 11357.13 11391.59 7.875% 8.000% 202.17 202.76 12129.97 12165.84
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
