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

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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