Do-While+Loops

// A)  ////  Do … While Loop  //  This loop works such that it executes the code within the loop as long as a condition is true. This is different from the “For” loop where we executed the loop a certain number of times.  The syntax for the do while loop is a bit simpler, but you have two options:  || ** //  Do  // ****  // While //  ** **  [ Statements ]  **  || ** __ OR __ ** **  [ Statements ]  **  || “Do”, “While”, and “Loop” are all keywords that Visual Basic will recognize as loop keywords. This may seem easier than a “For … Then” loop, but, let’s look at this example:  Do While x <=100   txtOutput.text= txtOutput.text & vbNewLine & x     x =x + 1   Loop || In this example, the loop will continue while “x” is below 101. “x” starts at 1, but each time through the loop, it increases by 1.   A big difference between “For … Then” loops and “Do … While” loops is that when you are using a “Do … While” loop, you must change something within the loop so the condition will eventually not be satisfied and the loop will exit.
 * // Loop  // **
 * ** // Do  // **
 * // Loop While  // ****   **
 * x = 1