+ 1
When we use exactly while loops
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.
+ 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.
0
what is deference between while loops and for loops?