Write a program called amortization.c to create a tablecontaining a customized l
ID: 3614779 • Letter: W
Question
Write a program called amortization.c to create a tablecontaining a customized loan amortization table. Your program willprompt the user to enter the amount borrowed (theprincipal), the annual interest rate (format:5.05 is 5.05%), and the number of monthly payments(n). To calculate the monthly payment, use the formulagiven in Programming Project 1 in Chapter 3 of your text. Thispayment must be rounded to the nearest cent. After the payment hasbeen rounded to the nearest cent, the program will create a tablethat resembles the following.Principal: $1000.00Annual Interest Rate: 9.00%Term: 6 monthsMonthly Payment: $171.07Payment Interest Principal Balance1 $7.50 $163.57 $836.432 $6.27 $164.80 $671.633 $5.04 $166.03 $505.604 $3.79 $167.28 $338.325 $2.54 $168.53 $169.796 $1.27 $169.79 $0.00Final Payment: $171.06Each month, part of the payment is applied to the interest and therest is applied to the principal. Because the payment and eachmonth's interest are rounded, the final payment will be a bitdifferent and must be calculated as the sum of the final interestpayment and the final principal balance. In your program, write afunction to prompt the user for the input and a function to printthe table.
Explanation / Answer
please rate - thanks #include #include #include int main () { double principal, rate, mrate, mpay, factor, interest,balance; int month, cnt; printf("Enter the principal of the loan: "); scanf("%lf",&principal); printf("What is the term of the loan (in months)?"); scanf("%d",&month); printf("What is the Annual Interest Rate)? "); scanf("%lf",&rate); mrate=(rate/1200); factor=pow(mrate+1,month); factor--; mpay=(mrate+(mrate/factor))*principal; printf("Principal: $ %.2f ",principal); printf("Annual Interest Rate: %.2f%% ",rate); printf("Term: %d months ",month); printf("Monthly Payment: $%.2f ",mpay); printf("Payment Interest Principal Balance "); cnt = 0; while(cntRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.