0
can someone explain this please. My name is jade and i've been defeated
Unlike for and while loops, which test the loop condition at the top of the loop, the do...while loop checks its condition at the bottom of the loop. A do...while loop is similar to a while loop. The one difference is that the do...while loop is guaranteed to execute at least one time.
2 Answers
+ 1
do{
// do something <--- this block runs through
}while( /*condition*/); // <--- then checks the first time whether the condition is true
while( /*condition*/){ // Checks the condition first
// do something <--- if the condition is true
}
for( /*counter*/;/* condition */; /* do after loop iteration */){ // checks condition first
// do something <--- if the condition is true
}
0
0_0 damn thanx bro!!!