I wrote this loop: [paste your loop]. Trace through exactly what value each variable holds on the first three passes and the last pass, as if you were a debugger. Then tell me: does this loop terminate, or could it run forever under some input? Be specific about what input would cause that.
