0

Can someone please provide a simple real-world code example situation of when one would use the while loop?

8th Mar 2016, 8:15 PM
chris
chris  - avatar
2 Answers
+ 1
a game loop is one example. in games you typically use a loop to ensure the game continues until some condition stops the game
18th Apr 2016, 3:45 AM
Jacob Perkins
Jacob Perkins - avatar
0
you can use while loop when you want to access a list or a tree, usually when you don't know the number of loops...
11th Jun 2016, 3:34 PM
Stavros Spinthiris
Stavros Spinthiris - avatar