Write a program that lets the user enter loan amount and loan period in numbers of years and display the monthly and total payments for each interest rate starting from 5% to 8%,with an increment of 1/8. Your program should have at least 2 methods,method for calculation and method to display the output. Suppose u enter the loan amount 10,000 for 5 years
Loan amount 10,000
Number of years: 5
Interest Rate Monthly Payment Total Payment
5% 188.71 11322.74
5.125% 189.28 11357.13
8% 202.76 12165.83
The formula as follows:
Monthly interest rate=Annual interest/1200
Monthly payment=(Loan Amount*Monthly Interest)/(1-(1+monthly interest)^number of years*12)
Total payment=Monthly Payment*number of years*12