I know what do does, and how it cooperates with the while loop, but won\'t a while loop code be the same, whether or not the do is there?
Consider the following:
while(condition){ myFunction(); }
and
do{ myFunction(); }while(condition);
The second form executes myFunction() at least once then checks the condition! To do so with a while loop you've to write:
myFunction()
condition
while
myFunction(); while(condition){ myFunction(); }