0
Pls, what instances should for or while or do while loop be used. As in what differentiate their uses
2 ответов
+ 1
Use "while" when you don't know how many iterations you need.
Use "for" when you know how many times it should be looped.
"do while" is for those awkward situations when you want while loop, but you still need to run the loop at least once. It's pretty rare.
0
Thank you