Click here to Skip to main content
14,641,454 members

Using C++ program to calculate loan repayment and amortization

zara7 asked:

Open original thread
Write a menu driven program, which would compute compound interest and a monthly payment for a loan. The user will be given a choice to display the info on the screen or to a file.
Menu will be doing the following:
Enter (1) to calculate your loan monthly payment
Enter (2) to calculate your loan monthly payment & write to a file
Compound Interest Formula
A = P(1 + r/n)^n*t
P = principal amount (the initial amount you borrow or deposit)
r = annual rate of interest (as a decimal)
t = number of years the amount is deposited or borrowed for.
A = amount of money accumulated after n years, including interest
n = number of times the interest is compounded per year
The program will be displaying something like the following:
Borrower’s Name:
Borrower’s Address:
Borrower’s Phone:
Loan Amount:
Interest Rate (APR):
Fixed Monthly Payment:
Note – always with the option to display in a file or on the screen.

What I have tried:

I have tried to create a function A to get input and pass it to function B to calculate.
Tags: C++


When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100