Problem: Write a program that reads in a loan amount, an annual percentage rate (for example, 7.5 would be 7.5 %), and term in months and displays the monthly payment amount for the loan. Calculate this amount using function calc_month_pay. Develop a case study before you come to lab! To code the program, 1. Write the prototype for function calc_month_pay. 2. Write the main function. 3. Write function calc_month_pay. To calculate the monthly payment use the formulas below in function calc_month_pay: 1. monthly_rate = annual_rate / 1200.0 2. expm = (1.0 + monthly_rate) 3. monthly_rate x expm ^ months x loan monthly payment = ---------------------------------------- (expm ^ months) - 1.0 where ^ means raise to a power. Don't concern yourself about what expm means. It is a variable in formula 3. Its value is set by formula 2 before it is used in formula 3. ************************************************************************* ****** Note: You must use pow(expm, (double) months) to calculate expm ^ months otherwise you get a floating point exception error. ************************************************************************* 4. Additional assignment due before lab next week. 5. Change function calc_month pay in the following way: Before calculating the monthly rate, if the loan amount is over 100000.00, deduct 0.5% from the annual percentage rate. If the loan amount is not over 100000.00 but is over 50000.00, deduct 0.25% from the annual percentage rate. Function calc_month pay should call a new function adjust_rate to do this. 6. Write function adjust_rate. Extra credit: Add a function display_table which will display a table that looks like the following: Total payments for a loan of $10000.00, term of 10 years, and interest rate of 6.0 % Year Amount paid to date 1 1500.00 2 3000.00 3 4500.00 ... When you call this function, you will have to pass it the monthly payment and the number of months of the loan. The body of this function should look something like the following. Complete the function heading and body. void display(...) { double annual_payment; //annual payment int num_years; //years of loan //Calculate annual_payment given month_payment; annual_payment = ... num_years = months / 12; total_payment_so_far = 0.0; //Display the total amount paid at the end of each year for (year = 1; year <= num_years; year++) { //Add annual_payment to total_payment_so_far total_payment_so_far = total_payment_so_far + annual_payment; printf("%d%15.2f\n", year, annual_payment); } }