Question: Intro to C Programming, Mortage Calculator program (loan repayment program) Create a program in C which takes in user inputs into console for dollar amount

Intro to C Programming, Mortage Calculator program (loan repayment program)

Create a program in C which takes in user inputs into console for dollar amount of mortgage (integer), length of mortage in years (integer), and interest rate (integer). Output the results to a table showing the first 3 months and the last 3 months.

Mortgage formula (below). Used with c math library for exponents.

Intro to C Programming, Mortage Calculator program (loan repayment program) Create a

Run the scenario for as many months as necessary starting from the first month until the mortage is paid.. For example 2 year or10 year depending on user inputs. (divide years by 12 to get months)

User inputs principle in dollars and cents (total amount of the mortgage). For example $150000

User inputs percent of interest as integer. For example 6% (divide interest by 12 to find monthly interest rate)

User inputs term in years. For example 2, 10, 20, 30 years in integer (divide by 12 to find number of months)

Program uses mortgage formula to calculate monthly payment with C math library to use exponents

Monthly payment (same every month). For example 6,648.10, rounded to 2 decimal places (use double not float), use this number to pay off to zero at the end, but must round up slightly to next higher penny to ensure mortgage is paid off by the final month.

Subtract monthly interest payment from payment towards principle (use double not float). Subtract payment towards principle from total principle. Interest and principle are then reducing each month.

Output the initial user inputs as results (interest, years, total principle) at top of results in table. Then, the table will display the month number (months 1, 2,3 and the final 3 months) with the principle at the beginning of the month, amount of interest paid, amount of payment toward principle, and principle balance after payment. Principle balance will be the principle for the next month. Amount of interest paid continues to decrease, while payment towards principle continues to increase throughout the life of the mortgage, until completely paid off in final month.

Attached output table shows example output in proper format to console.

program in C which takes in user inputs into console for dollar

monthly months 1 i monthly where M monthly principle and interest payment P principle (loan amount) 7 monthly interest rate, decimal form (eg. 1% 0.01) L length of loan in months

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!