+ 2

Can someone explain me or give some examples about do - while loop explanations ?

Ask about do - while loop

23rd Apr 2018, 11:36 AM
Jemwel Godinez
Jemwel Godinez - avatar
3 odpowiedzi
+ 3
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. It is guaranteed that the do-while loop will get executed at least Once!
24th Apr 2018, 6:33 PM
Mayank Rampuriya
Mayank Rampuriya - avatar
0
what if when the condition is true .. did it will execute until the condition is false ?
23rd Apr 2018, 1:05 PM
Jemwel Godinez
Jemwel Godinez - avatar
0
Donna ok...I understand it now
23rd Apr 2018, 1:28 PM
Jemwel Godinez
Jemwel Godinez - avatar