Write a program that calculates the price of housing that an individual can afford based on...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 <<math> 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. 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 <<math> 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.
Expert Answer:
Answer rating: 100% (QA)
Heres a simple C program that meets your requirements It calculates the affordable housing price bas... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Make a simple SWOT Analysis of the Australian app 'Eat Club'
-
Due to the rapid growth of your technology company, the executive team has asked HR to develop an internal training program. The purpose of the program is to help employees recently promoted to...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
DEFINE TABLE AUTHORS WITH COLUMNS AUTHORID INT AND AUTHORNAME VARCHAR(30),ADD COLUMN LEVEL PRIMARY KEY CONSTRAINT FOR AUTHORID, ADD COLUMN LEVEL NOT NULL CONSTRAINT FOR AUTHORNAME 2. DEFINE TABLE...
-
A cylindrical rod of steel (E =207 GPa, 30 106 psi) having a yield strength of 310 MPa (45,000 psi) is to be subjected to a load of 11,100 N (2500 lbf). If the length of the rod is 500 mm (20.0...
-
Make up an example of a monthly demand schedule for pizza and graph the implied demand curve. Give an example of something that would shift this demand curve, and briefly explain your reasoning....
-
How do the Nuer demonstrate both the dynamics of some kinds of patrilineality and the continuing relevance of anthropology?
-
(10%) Based on the following production and sales data of Shingle Co. for March of the current year, prepare (a) A sales budget (b) A productionbudget. Estimated inventory, March 1 Desired inventory,...
-
You have just received an OLRB order as a result of a consultation you conducted for a client last month. You strongly believe that the OLRB misapplied important evidence that you discussed during...
-
What is the value of CP's revised offer on December 8 (before CP "sweetened" its offer by adding the CVR security)? In your analysis, assume the following: a) A valuation date of December 31, 2015,...
-
Balance Sheet Period ending date 12/31/202x Number of months in period 12 Assets Current Assets $335,302,065 Fixed Assets $950,056,514 Other Assets $2,180,470,432 Total Assets $3,465,829,011...
-
The demand for money and bonds You have learnt in this chapter that the interest rate affects both the prices of bonds and the demand for money. Explain each of these relationships. Do these...
-
The following are the money demand and money supply functions in an economy. \[ \begin{gathered} M^{s}= 8,000 \\ M^{d}= 40,000(0.25-i) \end{gathered} \] a. Calculate the equilibrium interest rate. b....
-
One of the first commercial software packages I developed was a DSS to help schedule orders in a paper mill. The system was designed to help the person who scheduled orders decide when to schedule...
-
The South Dakota Department of Workers Compensation was sinking under a load of paper files. As a state agency that oversees that employees are treated fairly when they are injured on the job, the...
-
How are methods specified? Give an example of a method specification for a compute pay method associated with an hourly employee class.
-
The following is a bond quote for a semi-annual bond issued at par. What price will an investor pay to purchase FED Co. bond? FED Co. 8.75 15 April/XX Bid 100 25 Ask 101.75 7.78
-
Q1) What is the a3 Value Q2) What is the a7 Value Q3) What is the a4 Value Q4) What is the b3 Value Q5) What is the b2 Value Q6) What is the sign of 2nd constraint? A pastry chef at a bakery wants to...
-
In Exercises 5366, begin by graphing the standard quadratic function, f(x) = x 2 . Then use transformations of this graph to graph the given function. h(x) = (x - 2) + 1
-
The figure shows the graph of f(x) = ex. In Exercises 3546, use transformations of this graph to graph each function. Be sure to give equations of the asymptotes. Use the graphs to determine each...
-
In Exercises 1116, factor by grouping. x 3 - 2x 2 + 5x - 10
-
Following are several tests of controls introduced in the chapter: Examine periodic reports by non-Purchasing Department personnel regarding purchase prices and practices. Observe Receiving...
-
Harold Brodkey plans to apply sequential sampling to the receiving controls used by the Ozyck Corporation, a December 31, 1999 year end manufacturer and supplier of home lighting fixtures. Based on a...
-
Few departments within a corporation, not-for-profit institution, or governmental entity can have quite as significant an influence on cost containment as Purchasing, since the purchasing function...
Study smarter with the SolutionInn App