what your code currently does is, it stops when any single amount is greater than 1000. you need to come up with a way to "keep track" of what has already been allocated.
Reputation Points: 85
Solved Threads: 64
Practically a Master Poster
Offline 686 posts
since Mar 2007