|
-
September 26th, 2010, 08:08 PM
#1
Figuring out interest
Here is what I have below...
#include <iostream> // This program calculates the interest on a loan and the
using namespace std; // total amount of the loan after interest is added.
int main()
{ // Variables.
int preInterestLoan, interest, numOfPayments;
float monthlyPayments, amountPaidBack, interestPaid;
preInterestLoan = 10000; // Loan amount before interest.
interest = preInterestLoan * .01;
numOfPayments = 36; // 3 year loan.
return 0;
}
I still need to figure out how to calculate and display the monthlyPayments which are 332.14, the amountPaidBack which will total to $11,957.15, and the interestPaid which will obviously be $1,957.15. Any help as to how I can add them into the program? Thanks in advance.
-
September 27th, 2010, 05:05 AM
#2
Re: Figuring out interest
 Originally Posted by JerBear24
I still need to figure out how to calculate and display the monthlyPayments which are 332.14, the amountPaidBack which will total to $11,957.15, and the interestPaid which will obviously be $1,957.15. Any help as to how I can add them into the program? Thanks in advance.
How did you derive those figures? You must have applied some formula, so all you have to do is write the same formula in your program.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
-
September 27th, 2010, 05:22 AM
#3
Re: Figuring out interest
for display you can use
eg;
Code:
cout << "The monthly payments is " << monthlyPayments ;
-
September 27th, 2010, 09:05 AM
#4
Re: Figuring out interest
yeah I was giving these numbers, I was so confused because I kept doing the math and the numbers never added up. I guess I just display them and there is no math.
-
September 27th, 2010, 09:19 AM
#5
Re: Figuring out interest
You may want to look up how interest is calculated. It isn't that simple. try a search for "amortization formula".
-
September 27th, 2010, 09:38 AM
#6
Re: Figuring out interest
There's still something missing from your question. Simple loan amortization is relatively easy to calculate (for example, see http://www.hughchou.org/calc/formula.html). But using the standard formula results in a monthly payment of 282.08 rather than 332.14 which can be verified by any online mortgage calculator.
Obviously, in a real mortgage there are other factors that will modify the monthly payment amount but you haven't said anything about those factors so we must assume the standard calculation.
You need to provide more information about where the figures you were given came from - a web site? a book? homework?.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|