Question: 1) Implement this C program without the usage of arrays. Name this C program as loanCalc.c 2) Implement this C program using at least three arrays to store the interest, principle and...


Question:


1) Implement this C program without the usage of arrays. Name this C program as


loanCalc.c



2) Implement this C program using at least three arrays to store the interest, principle


and balance for each payment respectively. For example, interest[0] stores the paid


interest in the first payment. Name this C program as loanCalcArr.c .



3) Implement this C program using at least three arrays to store the interest, principle


and balance after each payment respectively. For example, interest[0] stores the


paid interest in the first payment. Besides, please use three pointers to visit the


element in the three arrays separately. Name this C program as loanCalcPtr.c .



4) Implement this C program by defining a structure for each payment. The structure


should have at least three members for the interest, principle and balance


separately. And store all the payments in a structure array (the max size of which


could be 100). Name this C program as loanCalcStruct.c .




Note:



• for each C program above please attach a screenshot of the output when



amount of loan is $2000, interest rate per year is %7.5 and number of payment is 6.


Write a C program to calculate monthly payment and print a table of payment schedule for a<br>fixed rate loan, which performs a similar task as in the link below:<br>http://www.bankrate.com/calculators/mortgages/loan-calculator.aspx<br>In this C program, the input and output are defined as following:<br>Input: amount of loan, interest rate per year and number of payments<br>Output: a table of amortization schedule (also called payment schedule) containing<br>payment number, monthly payment, principal paid, interest paid and new balance at each<br>row.<br>The attached screenshot below shows a sample of the output.<br>Yuans-MacBook-Pro:PC yuanlong$ ./loanCalc<br>Enter amount of loan : $ 500<br>Enter Interest rate per year : % 7.5<br>Enter number of payments : 5<br>Montly payment should be 101.88<br>=AMORTIZATION SCHEDULE===<br>Principal<br>$98.76<br>$99.38<br>$100.00<br>$100.62<br>$101.25<br>Balance<br>Payment<br>$101.88<br>$101.88<br>$101.88<br>$101.88<br>$101.88<br>Interest<br>$3.12<br>$2.51<br>$1.89<br>$1.26<br>$0.63<br>$401.24<br>$301.87<br>$201.87<br>$101.25<br>$0.00<br>

Extracted text: 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 of loan, 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 yuanlong$ ./loanCalc Enter amount of loan : $ 500 Enter Interest rate per year : % 7.5 Enter number of payments : 5 Montly payment should be 101.88 =AMORTIZATION SCHEDULE=== Principal $98.76 $99.38 $100.00 $100.62 $101.25 Balance Payment $101.88 $101.88 $101.88 $101.88 $101.88 Interest $3.12 $2.51 $1.89 $1.26 $0.63 $401.24 $301.87 $201.87 $101.25 $0.00
Note:<br>monthly payments are equal. The way to calculate monthly payment and other values for<br>each row are provided in Appendix.<br>The C program can be implemented within 80 lines of code. If your program is longer<br>than 80 lines, you may need to think about how to simplify your program.<br>Hint: To print out a percentage %, please use %%. You may need to use C math library to<br>calculate the powers of numbers. To compile a C program using math library, you must add<br>option Im at the end of the cc command to link math library. E.g. gcc -o test test.c -Im<br>

Extracted text: 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 %, please use %%. 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
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here