go to previous page   go to home page   go to next page

Answer:

At the top of the loop, before the loop body is executed.


Top-driven Loops

Universal Flowchart

Such loops are called top-driven loops. They are generally easiest to understand and to program than other kinds of loops. Notice that the condition (at the top of the loop) tests if it is OK to proceed with the loop body. The loop body processes the data (if it was OK to proceed). The bottom of the loop body looks for more data.


QUESTION 23:

(Thought Question:) Do you think that a programming language that allows recursion has more algorithmic power than one that does not?