Computer Science

All you need to know about the basics of information technology

Cycles in CS

Who among us does not remember an instructive story about how Tom Sawyer's aunt Polly's job was painting the fence: "Sighing, he dipped the brush into the bucket, picked up a Board fence, repeated the operation did it again..." (mark TWAIN. The Adventures Of Tom Sawyer).

Let us construct the algorithm for painting the fence. Suppose that we have a paint brush and enough paint. Write, for example, the following sequence of actions: