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

  Write c program-visual studio to scan multiple text files

Write program in C or C++ and Visual Studio to scan multiple text files and count number of occurrences of each word in those files. Use binary tree to keep track of all words.

  Squares, triangles, circles and ellipses

write a program which will answer a pair of questions for squares, triangles, circles and ellipses. A square is defined by its lower left corner ( S L L x , S L L y ), and the length of one side  S W .

  Preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  You will write a program that reads a text file

You will write a program that reads a text file, counts the number of words in the file, and the number of occurrences of each character. It will print to a file the number of words, and the number of occurrences of each character, as well as the ..

  Program that displays the ball at a random

Write a C++ program that displays the ball at a random location and then makes the ball move down to the bottom of the screen. When the ball reaches the bottom of the screen, it should start these actions over again, appear-ing at another random l..

  Calculates the sum of the cube roots of two integers.

Wrtie a program that calculates the sum of the cube roots of two integers. The program should use the following functions as well as a main funcion. 1) enter one positive value 2) compute the cube root of one integer 3) report the value of two intege..

  Describe the process replace a do...while loop with an equiv

Describe the process you would use to replace a do...while loop with an equivalent while loop. What problem occurs when you try to replace a while loop with an equivalent do...while loop? Suppose you have been told that you must remove a while loop a..

  T computes and posters the probabilities of two people

Write a C program that computes and posters the probabilities of two people in a group who are born in the same day. The probability of two people being born in the same day of the year, for a group of  n people, is given by the following formula:

  Dealerships are awarded the rebate

Dealerships are awarded the rebate on a quarter-by-quarter basis, only for quarters where their actual sales exceeded expected volumes for that quarter. Expected sales volumes for each quarter are as follows:

  Implemented a regular binary search tree

In Computer Science I, you implemented a regular binary search tree. Due to your busy schedule, you've decided that it would be best if you could simply reuse this code without any changes. You realize that your code would ONLY work for Arup's ass..

  Prints out a multiplication table up to a specification

Create a program using C++ that prints out a multiplcation table up to a specfic limit. The code should prompt the user for the limit and then print out the table.

  Write a menu-driven c program

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

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