Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 10th, 2010, 10:13 PM   #1
PaCkEtPiRaTe
Hobbyist Programmer
 
PaCkEtPiRaTe's Avatar
 
Join Date: Aug 2007
Location: Massachusetts, USA
Posts: 194
Rep Power: 3 PaCkEtPiRaTe is on a distinguished road
Re: Loan Calculator Problems

Quote:
Originally Posted by abdul.gafur View Post
initinterest still in percent, you must multiply by 0.01
try this :
c++ Syntax (Toggle Plain Text)
  1. ...
  2. cout << "Enter the amount of the loan: $";
  3. cin >> initLoan;
  4. newLoan = initLoan;
  5. cout << "Enter the interest amount: %";
  6. cin >> initInterest;
  7. newInterest = initInterest;
  8. monthlyInterest = newInterest*0.01 / 12;
  9. cout << "Enter the monthly payment: $";
  10. cin >> initMonthly;
  11.  
  12. while (newLoan >= 0) {
  13. principal = initMonthly - newLoan*monthlyInterest;
  14. newLoan = newLoan - principal;
  15. monthCount++;
  16. }
  17. ...
Thanks! It worked. I'm going to have to go over this because all I did was compile and try it. I want to make sure I understand what it is you did. Thanks anyway.
PaCkEtPiRaTe is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loan Amortization Problem robert2513 C++ 6 Mar 1st, 2005 4:55 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:03 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC