create a bool flag before the loop starts and set it to false. when a swap is made change the flag to true. on next loop iteration if the flag is still false then no swaps were performed during the previous loop iteration.
and please next time use code tags.
Last edited by Ancient Dragon; Nov 21st, 2006 at 2:40 pm.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Offline 21,963 posts
since Aug 2005