+ 2

What do while loop will do?

5th Oct 2017, 9:46 AM
Nikhil.B.V
4 Answers
+ 14
In addition to friends' great explanations, here you can see another thread about the difference between while and do...while loop with an example. [https://www.sololearn.com/Discuss/760143/what-is-the-different-between-while-and-do-while-in-pension]
5th Oct 2017, 10:22 AM
Babak
Babak - avatar
+ 10
It repeats a section of code over and over again while some condition is met. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats this sentence. Like say, while Ahri is not bored she repeats I'm bored now.
5th Oct 2017, 9:57 AM
Ahri Fox
Ahri Fox - avatar
+ 7
Do while will iterate the loop at least one time before evaluating the condition as opposed to While which will evaluate the condition before iterating even once. It's the location of the continue condition before or after the loop.
5th Oct 2017, 10:10 AM
Dark Angel
Dark Angel - avatar
+ 4
It executes a block of code and checks for a condition Different from a normal while loop which checks the condition first before doing it
5th Oct 2017, 10:25 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar