VanDavv / IT-Labs

Solved tasks from IT labs on ZUT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 ;-)

I guess site was modified recently. I've opened it some time ago and there's what I have. And I bet in 5.7 there was also mention about n var. Anyway thx for Your help.
screenshot from 2016-12-14 18-44-45