I'll explain the basics of while and do while loops to you and see if that helps.
While loops are in this form:
Code:
while(condition)
{
/* Statements */
}
int x = 3; /* Just an example of something that could come after */
"Condition" is anything that evaluates to true or false (eg. x < 2, assuming you had x defined). When the program gets to the top of the loop, it checks to see if that condition is true or false. If it is false, the body of the while loop (those statements between the {}) is skipped and execution continues after the while loop ends (the "int x = 3;" line). If it is true, the statements are executed in order. Afterwards, the condition is checked again and the same happens. You can see that if it is false to begin with, the loop will be skipped over.
Do-while:
Code:
do
{
/* Statements */
} while(condition)
int x = 3;
Here, the loop runs at least once. It starts from the top and works its way down the statements in the body. After that, the condition is tested. If it's true, then the body of the loop is executed again and if not, execution continues after the loop ends as before.
Does that help at all?