Quote:
Originally Posted by abdul.gafur
initinterest still in percent, you must multiply by 0.01
try this :
... cout << "Enter the amount of the loan: $"; cin >> initLoan; newLoan = initLoan; cout << "Enter the interest amount: %"; cin >> initInterest; newInterest = initInterest; monthlyInterest = newInterest*0.01 / 12; cout << "Enter the monthly payment: $"; cin >> initMonthly; while (newLoan >= 0) { principal = initMonthly - newLoan*monthlyInterest; newLoan = newLoan - principal; monthCount++; } ...
|
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.