When does the code check for the smallest value
and when does it check for the 0 to exit the loop?

Please edit your post and wrap your code with code tags:


YOUR CODE HERE

to get...