28,660 questions
Do While
- The flow diagram for the do-while loop is given below.
- In a do-while loop, the condition is evaluated first, and based on the condition, only the body of the loop executes.
- Refer: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/while-end-while-statement
- The body of the loop may execute 0 or more times.
Do Until
- The flow diagram of do until loop is as below
- In a do-until loop, the body of the loop will be executed and then the condition will be evaluated to decide to quit the loop or to continue the loop.
- Refer: https://learn.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/do-loop-statement
- Here the Body of the loop will be executed at least once.
Hope this helps.