Write a loan calculator program

Assignment Help C/C++ Programming
Reference no: EM13168377

Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple, the loan terms (input) file will have the following syntax:
<loan amount><tab character><number of monthly payments><tab character><annual interest rate>
save the output in a file that is also specified  entered from the keyboard.

The formula for calculating a monthly payment is:
P = the initial amount of the loan
I = the annual interest rate
J = monthly interest rate = (I / 100) / 12
N = number of months
M = monthly payment

                   J
M  = P * (J + -------------)
                      N
              ( 1 + J)  - 1   
or

M = P * (J + (J / ((1+J)^N - 1)))

use this data

P = $2,800,000
I = 8.40% (that's the interest rate that I got for my Zonda :)
J = (8.4 / 100) / 12 = 0.007
N = 24 (2 years)

M = $2,800,000 * (0.007 + (0.007 / ((1+0.007)^24 - 1))) = $127,148.37

PLS PLEASE NOTE only the first and last three months be detailed by your program (and no more) and that they be separated with an ellipsis ("...").

THe output should look like this

Initial balance: $2800000.00
Number of payments: 24
Annual interest rate: 8.40%
Monthly payment: $127147.84

Month   Interest        Principal       Balance
1       $19600.00       $107547.84      $2692452.25
2       $18847.17       $108300.68      $2584151.50
3       $18089.06       $109058.78      $2475092.75
...
22      $2633.15        $124514.69      $251650.28
23      $1761.55        $125386.29      $126263.99
24      $883.85 $126263.99      $0.00

Total interest paid: $251548.19

Reference no: EM13168377

Questions Cloud

Computers have trended to larger word : Since the beginning, computers have trended to larger word sizes, 8 to 16 to 32 and now some 64 bit computers. Explain a pro or a con in a computer with a larger word size, or comment on someone else's pro or con.
Choose the answer that shows a correctly balanced equation : Choose the answer that shows a correctly balanced equation.
If m is a dfa accepting language b : If M is a DFA accepting language B, then exchangeing the accept and reject states gives a new DFA accepting the complement of B. Does this work for an NFA, why?
Calculate the amount of energy required in calories : calculate the amount of energy required in calories to heat 145g of h2o from 22.3 degrees c to 75.0 degrees c.
Write a loan calculator program : Write a loan calculator program in C++ that displays monthly balances for user-specified loan terms. To be flexible, you decide to specify the loan terms in a file and provide that filename  entered from the keyboard. To keep things simple
Calculate the enthalpy change for the dissolution of nh4no3 : Assuming the solution has a heat capacity of 4.18 J/°C·g and assuming no heat loss to the calorimeter, calculate the enthalpy change for the dissolution of NH4NO3 in units of kJ/mol.
Two hosts, a and b, are separated by 20,000 : two hosts, A and B, are separated by 20,000 kilometers and are connected by a link of R=2 Mbps, and there are 4 routers between A and B. Suppose the propagation speed over the link is 2.5*108 meters/sec, average queueing time is 2ms,
What are the rates of production of p4 and h2 : If the reaction is carried out in a 2.0 L container and 0.010 mol of PH3 is consumed each second, what are the rates of production of P4 and H2?
Write a program that draws a picture of a house : Write a program that draws a picture of a house. It could be as simple as the accompanying figure, or if you like, make it more elaborate

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Declare a vector

Declare a vector of these structures where the size of the vector is to be 7.

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  Find the sixth maclaurin polynomial for sin x

Find the sixth Maclaurin polynomial for sin x and use Chebyshev economization to obtain a lesser-degree polynomial approximation.

  Create a program that maintains the required book catalog

Create a program that maintains the required book catalog for the circulation desk of a library.

  Program that takes a number between

Write a program that takes a number between -121 and 121 and output that number in the format of power of 3 (1,3,9,27)example:13 = 9+3+1

  Write a c++ program that prompts the user for a double

Write a C++ program that prompts the user for a double that should be between 0 and 100. If the value entered is outside of the interval the program will print an error message. The program should continue to repeat until the user enters an appropria..

  Program to input the length of the side from the keyboard

write a program to input the length of the side from the keyboard ,use the class to obtain the areas of all shapes and display the results on the screen

  Test a program that prompts for the user

Write and test a program that prompts for the user to input a file name and uses two functions head() and tail() - head() displays the first 10 lines of a file

  Complete the design and implementation

Complete the design and implementation of the class customerType defined in the Programming Example Video Store. b. Design and implement the class customerListType to create and maintain a list of customers for the video store.

  Write a matrix multiplication program

Write a C++, matrix multiplication program which you can instrument to monitor and measure execution time as a function of problem size. Make sure it works in Microsoft Visual Studio.

  Demonstrate the construction and output of an array

In fluid mechanics, the Reynolds number (Re) is a dimensionless quantity that is used to help predict similar flow patterns in different fluid flow situations. For example, Reynolds numbers can be computed for different velocities of fluid flow over ..

  Add a copy constructor

Take the code below and add a copy constructor, assignment operator definition and destructor to the class. These functions have already been started for you.

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