0
until now i'm just confuse, what are the differnce between do while and while do?? please help me guys, and give me an example??
c++ https://www.sololearn.com/discuss/870114/?ref=app https://www.sololearn.com/discuss/869491/?ref=app
3 Réponses
+ 7
while: the statements are executed after testing the condition.
do while: the statements are executed once before testing the condition and then the condition is tested if the condition is true the loop will continue
in do while the statements are executed once though the condition is false
+ 8
There is no while do loop. There is only a do while loop and a while loop. A while loop executes a block of code while the condition is true. A do while loop is the same but it executes the block of code before checking the condition.