Question: At first, the program shall obtain four user inputs: ( a ) property price , ( b ) loan ratio , ( c ) yearly
At first, the program shall obtain four user inputs: a property price b loan ratio c yearly
interest rate and d number of years of the mortgage.
The above inputs are valid only if all the following conditions are met:
property price is positive; and
loan ratio is positive but at most ; and
yearly interest rate is positive; and
number of years is positive.
In case any of the inputs is invalid, the program shall print a warning message and then
terminate.
Otherwise, the down payment loan amount and monthly payment shall be computed and
displayed.
Next, the program shall obtain one more user input: e the number of monthly payments made
This input is valid only if it is at least but smaller than In case this input is invalid, the
program shall print a warning message and then terminate.
Otherwise, the amount still owed and total interest paid after months shall be determined and
displayed.
You can assume that user inputs ac are always entered as floating point numbers and user
inputs de are always entered as integers. Therefore, you can use the double data type for
storing ac and the int data type for storing de
When doing power calculations
you can use the C function pow You must
#include at the top of your program before using it
When printing the down payment, loan amount, monthly payment, amount still owed, and total
interest paid, the numbers shall be printed in fixed point notation never scientific notation and two
decimal places. This can be done by:
cout fixed setprecision numbertobeprinted;
To use the above, you must #include at the top of your program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
