Create a program that calculates monthly loan payments and the total payment amount for a given loan. The program should take user input for the annual interest rate, the number of years for the loan, and the loan amount (in this order). It will then use this information to calculate and display the monthly payment and total payment.
Make use of the following formula to calculate the monthly payment:
monthlyPayment = loanAmount * monthlyInterestRate / (1 - 1 / (1 + monthlyInterestRate) ** (numberOfYears * 12))
Below is an example execution of the assignment. The text in red represents user input and is logically not printed by your program. The numbers after the comma must not be printed.
8.25 5 120000.95 The monthly payment is 2447 The total payment is 146854