Determining the monthly payment on a mortgage loan, C/C++ Programming

Assignment Help:

The following is the formula that can be used to complete that calculation:

Monthly Payment =

Monthly Interest Rate / (1 - (1 + Monthly Interest Rate) -Payment Interval)) * Principal

Where

Monthly Interest Rate expressed as: Interest Rate / 100 / 12.

Payment Interval expressed as: Number of Years * Months of Year.

Principal is total amount of mortgage expressed without any comma separators or $ prefixing it.

An example for the above formula:

Rate: 7.75

Period: 360

Principal: $100,000

(7.75 / 100 /12) / (1 - (1 + 7.75 /100 / 12) ^ -(30 * 12) ) * 100000

The result of the above formula generates a value of 682.18. (Note that there is no formatting of the value.) The ^ is the symbol for an exponent that replaces the superscript in an actual formula.

In C++ you must declare variables for the rate, period, principal, and monthly payment. Each of these variables is prefixed with a data type. In this case the data types are limited to float for decimal-based numbers (interest rate and monthly payment) and int for whole numbers (payment interval and principal). NOTE: C++ in case sensitive so be sure the variable is the same in every instance.

Some of the Code:

          Payment = ?? / (1 - pow((1 + ??), - ?? * 12))  * ??;

          cout << "Your monthly mortgage payment is $" << ?? << endl  << endl;

[Remember to have #include

Test:

Rate

Period

Principal

Monthly Payment

3.50%

30 years

$350,000.00

1571.656

6.25%

15 years

$275,000.00

2357.913

7.325%

30 years

$468,000.00

3216.427*

5.50%

40 years

$725,000.00

3739.335

8.125%

30 years

$645,000.00

4789.107*

*Possible rounding error


Related Discussions:- Determining the monthly payment on a mortgage loan

Explain about inheritance, Inheritance and Reuse Consider a car manufac...

Inheritance and Reuse Consider a car manufacturing company. When they require building a new car, they have two choices. They can start from the scratch, or they can change an

Luminous jevel, Ask queByteland county is very famous for luminous jewels. ...

Ask queByteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colo

C expressions - assume variables are double or float, Assume variables x, f...

Assume variables x, f, and d are of type int, float, and double, respectively.  Their values are arbitrary, except that neither f nor d equals +∞, -∞, or NaN .  For each of the fo

Explain public derivation, Public derivation Public derivations are muc...

Public derivation Public derivations are much more common than private derivations. In this situation: The private members inherited from the base class are inaccessible

Explain mixed mode expressions and implicit type conversions, Mixed Mode Ex...

Mixed Mode Expressions and Implicit type Conversions A mixed mode expression is one in which the operands are not of the similar type. In this case, the operands are converted

Write a c program to compute the value of a sine wave, Write a C program to...

Write a C program to compute the value of a sine wave from 0 to 2P with an increment of 0.1 radians.   #include stdio.h #include math.h #define pi 3.1415927 void main() {   c

Application to maintain soccer team information, Write a C program "team.c"...

Write a C program "team.c" that maintains information for a soccer team. The program will allow you to add and delete players from your team, to search your team for players by nam

Random question, Ask question #write statement that assign random integer t...

Ask question #write statement that assign random integer to the varaible n in the (100

Abstract class Employee , I have to add virtual void calculatePay and virtu...

I have to add virtual void calculatePay and virtual void displayEmployee. How to I implement that in Salaried and Hourly Employee?

C++, #include long BixFunction(int x, int y = 5, float z = 5) { return...

#include long BixFunction(int x, int y = 5, float z = 5) { return(++x * ++y + (int)++z); } int main() { cout return 0; }

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd