<P> The do while construct consists of a process symbol and a condition . First , the code within the block is executed , and then the condition is evaluated . If the condition is true the code within the block is executed again . This repeats until the condition becomes false . Because do while loops check the condition after the block is executed , the control structure is often also known as a post-test loop . Contrast with the while loop , which tests the condition before the code within the block is executed , the do - while loop is an exit - condition loop . This means that the code must always be executed first and then the expression or test condition is evaluated . If it is true , the code executes the body of the loop again . This process is repeated as long as the expression evaluates to true . If the expression is false , the loop terminates and control transfers to the statement following the do - while loop . In other words , whereas a while loop sets the truth of a statement as a condition precedent for the code 's execution , a do - while loop provides for the action 's ongoing execution subject to defeasance by the condition 's falsity , which falsity ( i.e. , the truth of the condition 's negation ) is set as a condition subsequent . </P>
<P> The do while construct consists of a process symbol and a condition . First , the code within the block is executed , and then the condition is evaluated . If the condition is true the code within the block is executed again . This repeats until the condition becomes false . Because do while loops check the condition after the block is executed , the control structure is often also known as a post-test loop . Contrast with the while loop , which tests the condition before the code within the block is executed , the do - while loop is an exit - condition loop . This means that the code must always be executed first and then the expression or test condition is evaluated . If it is true , the code executes the body of the loop again . This process is repeated as long as the expression evaluates to true . If the expression is false , the loop terminates and control transfers to the statement following the do - while loop . In other words , whereas a while loop sets the truth of a statement as a condition precedent for the code 's execution , a do - while loop provides for the action 's ongoing execution subject to defeasance by the condition 's falsity , which falsity ( i.e. , the truth of the condition 's negation ) is set as a condition subsequent . </P>
the loop which execute once before condition is checked
the loop which execute once before condition is checked
post-test loop
post-test loop