+ 1

When we use exactly while loops

22nd Jan 2017, 1:00 PM
Mohmed Zahir
Mohmed Zahir - avatar
3 Respostas
+ 3
While loops are considered an "indefinite loop" (meaning, we don't know when they will end). Therefore, you use something called a "sentinal value" that the loop checks every iteration. The sentinel value is used to terminate the loop whenever it's necessary.
22nd Jan 2017, 4:10 PM
Keto Z
Keto Z - avatar
+ 2
While loops are indefinite, meaning that we don't know when they will end. For loops are definite, meaning we do know when they will end.
26th Jun 2017, 1:13 AM
Keto Z
Keto Z - avatar
0
what is deference between while loops and for loops?
3rd Apr 2017, 8:10 AM
Mohmed Zahir
Mohmed Zahir - avatar