Question: Part II: Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan, which performs a
Part II: Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan, which performs a similar task as in the link below http://www.bankrate.com/calculators/mortgages/loan-calculator.aspx In this C program, the input and output are defined as following: Input: amount ofloan, interest rate per year and number of payments Output: a table of amortization schedule (also called payment schedule) containing payment number, monthly payment, principal paid, interest paid and new balance at each row. The attached screenshot below shows a sample of the output. Yuans-MacBook-Pro:PC yuantongs ./LoanCatc Enter amount of loan $500 nter Interest rate per year % 7.5 Enter number of payments :5 Montly payment should be 101.88 ccAMORTIZATION SCHEDULE Payment $101.88 $101.88 $101.88 $101.88 $101.88 Principal $98.76 $99.38 $100.00 $100.62 Interest $3.12 $2.51 $1.89 $1.26 $0.63 Balance $401.24 $301.87 $201.87 $101.25 Note: monthly payments are equal. The way to calculate monthly payment and other values for each row are provided in Appendix. The C program can be implemented within 80 lines of code. If your program is longer than 80 lines, you may need to think about how to simplify your program. Hint: To print out a percentage 96, please use 9696. You may need to use C math library to calculate the powers of numbers. To compile a C program using math library, you must add option Im at the end of the cc command to link math library. E.g.gcc -o test test.c -Im Part II: Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan, which performs a similar task as in the link below http://www.bankrate.com/calculators/mortgages/loan-calculator.aspx In this C program, the input and output are defined as following: Input: amount ofloan, interest rate per year and number of payments Output: a table of amortization schedule (also called payment schedule) containing payment number, monthly payment, principal paid, interest paid and new balance at each row. The attached screenshot below shows a sample of the output. Yuans-MacBook-Pro:PC yuantongs ./LoanCatc Enter amount of loan $500 nter Interest rate per year % 7.5 Enter number of payments :5 Montly payment should be 101.88 ccAMORTIZATION SCHEDULE Payment $101.88 $101.88 $101.88 $101.88 $101.88 Principal $98.76 $99.38 $100.00 $100.62 Interest $3.12 $2.51 $1.89 $1.26 $0.63 Balance $401.24 $301.87 $201.87 $101.25 Note: monthly payments are equal. The way to calculate monthly payment and other values for each row are provided in Appendix. The C program can be implemented within 80 lines of code. If your program is longer than 80 lines, you may need to think about how to simplify your program. Hint: To print out a percentage 96, please use 9696. You may need to use C math library to calculate the powers of numbers. To compile a C program using math library, you must add option Im at the end of the cc command to link math library. E.g.gcc -o test test.c -Im
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
