PreTest Do/Loop |
PostTest Do/Loop |
1. Do-while tests the loop condition each time through the loop & it keeps executing while the test expression is a true value. |
Loop while we check the condition at the bottom. |
2.When the conditional expression is false then |
When the loop while is used ,the body of loop |
the statements in Do/Loop are skipped. | is executed at least once, since the condition is at the bottom of the loop.
|
3. General Syntax is : Do while <condition> <statements> Loop General Syntax is | General Syntax is : Do <statements> Loop while<condition> |
4. Ex. Do While intNumber < 100 lblNumber.Caption=intNumber intNumber = intNumber + 1 Loop | Ex. Dim intNum as integer Do Form1.print intNum intNum = intNum +1 Loop while(intnum <= 10) |