5.5,5.7 & 5.11 while loop
devkonstan opened this issue · comments
Hi,
Question about exs 5.5, 5.7 & 5.11.
What does "1" in while loop mean?
I guess it's a ref to the script with that name based on colour of the lettering ;-)
It's not included anywhere in the pack, so these scripts don't work :/
Could You please show example of these scripts when they're not working? e.x. console output?
while (( 1 ))
is so called "infinite loop", so in these examples it takes user input for as long as the condition with break statement is not true
In 5.5 there is no error, but lack of n var cause infinite summing of numbers interrupt only by typing "0". The same problem occurs in 5.7.
In 5.11 everything is OK. I just didn't understand this while loop thing ;-)
Tasks 5.7 and 5.5 does not mention any n value. See http://www.mborawski.zut.edu.pl/Didactics/IntroductionToCompScienceLab/index.html#idExerciseLoop31