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

Stack, flow chart for push operation in stack

flow chart for push operation in stack

C program for string address, C Program for STRING ADDRESS #include std...

C Program for STRING ADDRESS #include stdio.h> #include conio.h> #include string.h> void main() {           char *name;           int length;           cha

Define a structure of student class, Define a structure of student class:  ...

Define a structure of student class:  Write a program to define a structure of student record in C. class student { char name[20]; int roll_no; int marks[2];

Text Editor, Add a function for saving the text stored in an array to a fil...

Add a function for saving the text stored in an array to a file. Your program must check whether or not the output file already exists, and if it does, your program must ask the us

Explalin concept of derivations in c++, derivations 1. Regardless of the...

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,

#c++, There is a pebble merchant. He sells the pebbles, that are used for s...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Wap to print series from 1 to 10 & find its square and cube, WAP TO PRINT S...

WAP TO PRINT SERIES FROM 1 TO 10 & FIND ITS SQUARE AND CUBE # include stdio.h> # include conio.h> # include math.h>   void main () { int a=1,sqr=0,cube=0;

Create an array of strings, Create an array of Strings and fill it with som...

Create an array of Strings and fill it with some interesting text, such as vacation destinations, album names, or weapon names from a CRPG. Display three elements of the array on t

Decodethecode.h, decodes the sending smuggler string from the number format...

decodes the sending smuggler string from the number format into plain text

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