This is my code on a simulation of a Bank that has 10 people that manage the account:
http://pastebin.com/SN4TFhcH
I decided to add the feature of taking loans at random times and added a number of function to calculate the Interest, the total amount of money owed, and the random chances of returning that money.
The program has a bit too many loops though, making it harder to find the source of the error.
The problem is this:
The program does not complete the 600 iterations in the loop on line 555.
There is no specific number of iterations it will run, it can be that it stops on the first, and I have seen it reach completion once (only once).
This has made me reach the conclusion that there must be some loop that is not reaching completion for some specific values. I had encountered the same error earlier when there were no Loans.
I had made a mistake with the greater than sign rather than less than sign that would have triggered an if statement to break an infinite loop.
I can't seem to find the point of error this time. I am sure the error appeared after I added the Loan functions.
I have been at this for hours, but to no avail!
Any help?