Quote Originally Posted by GCDEF View Post
I don't get stuck in any loop. What is the problem and how do we recreate it? Have you tried the debugger?
To recreate it put
Code:
Payment=Total*MinInterest;
at the end of the loop in calculate.
The reason for this is to reset the minimum payment for each month. If you also add
Code:
cout<<Payment<<" "<<month<<endl;
system("PAUSE");
The code does not actually get stuck the decimal points just keep getting longer. I just do not know how to fix this. I have searched for trimming double on goggle but found nothing. My problem is I do not understand how to do it. My incompetence is the problem. Just asking how is the correct way to do this.