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

22nd Nov 2017, 1:58 PM
Addah, Alnisal S.
Addah, Alnisal S. - avatar
3 Antworten
+ 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
22nd Nov 2017, 2:12 PM
Faceless
Faceless - avatar
+ 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.
22nd Nov 2017, 2:04 PM
qwerty
qwerty - avatar