Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan. In this C program, the

Write a C program to calculate monthly payment and print a table of payment schedule for a fixed rate loan.

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 a mortization schedule (also called payment schedule) containing payment number, monthly payment, principal paid, interest paid and new balance

at each row.

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 imple mented 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 lm at the end of the cc command to link math library.

Question:

1)

Implement this C program without the usage of arrays .Name the is C program as loanCalc.c

2)

Implement this C program using at least three arrays

to store the interest, principle and balance foreach 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 elementin

the three arrays separately.

Name this C program as loanCalcPtr.c

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions