Computer Science, asked by Ayushi05, 1 year ago

what is the difference between while and do while loop?

Answers

Answered by vee11
8
The while loop keeps repeating an action until an associated condition returns false. This is useful where the programmer does not know in advance how many times the loop will be traversed.

The do while loop is similar, but the condition is checked after the loop body is executed. This is ensures that the loop body is run at least once.
Similar questions