Онлайн-рабочие станции OnWorks Linux и Windows

Логотип

Бесплатный хостинг в Интернете для рабочих станций

<Предыдущая | Содержание: | Следующая>

петля

Daily life is full of repeated activities. Going to work each day, walking the dog, slicing a carrot are all tasks that involve repeating a series of steps. Let’s consider slicing a carrot. If we express this activity in pseudocode, it might look something like this:

1. get cutting board

2. get knife

3. place carrot on cutting board

4. lift knife

5. advance carrot

6. slice carrot

7. if entire carrot sliced, then quit, else go to step 4

Steps 4 through 7 form a поиска. The actions within the loop are repeated until the condi- tion, “entire carrot sliced,” is reached.


 

Лучшие облачные вычисления для ОС в OnWorks: