Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that calculates the price of housing that an individual can afford based on their financial situation. The program should take two

 Write a program that calculates the price of housing that an individual can afford based on their financial 

Write a program that calculates the price of housing that an individual can afford based on their financial situation. The program should take two inputs: 1. The amount of down payment (1st input) 2. The monthly income (2nd input) The program should calculate the price of housing that can be afforded based on the following conditions: The Prime lending rate is assumed to be 5.875% per annum. The debt-to-income ratio is set at 50%. This means that the minimum monthly income requirement is equal to twice the monthly mortgage payment. If the calculated mortgage amount is more than $7,000,000, a 2% cash back is returned to the customer. The program should then calculate the affordable housing price by adding the down payment and the 2% cash back (if applicable) to the maximum mortgage amount. As output, the affordable housing price should be displayed as an integer, rounded to the nearest ten thousand. Note: You should use repetition structure, with for/while loop, and NOT < library functions in this question. Mortgage Formula: (1+r)" (1+r)" - 1 where M- Monthly payment, P = Mortgage amount, r = monthly interest rate, n = Number of repayments (months) Sample display (for odd) 1000000 50000 6060000 M Pr 5th digit of Student ID Annual Interest Rate Repayment period (years) Odd Prime - 2.5% Even Prime - 2.625% Sample display (for odd) 2000000 80000 10260000 25 30 Sample display (for even) 1000000 50000 6740000 Sample display (for even) 2000000 80000 11370000 IMPORTANT NOTE: You need to follow all text and order as shown in the sample display. There should be NO prompt messages and additional blank lines in the output. DO NOT add extra text in the output which will be considered as incorrect in marking.

Step by Step Solution

3.38 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

Heres a simple C program that meets your requirements It calculates the affordable housing price bas... 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

College Algebra

Authors: Robert F Blitzer

7th Edition

013449492X, 9780134453262

More Books

Students also viewed these Programming questions

Question

In Exercises 1116, factor by grouping. x 3 - 2x 2 + 5x - 10

Answered: 1 week ago