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

Answer:

The for statement. for statements will be discussed in several pages.


Looks like a Code Block

In all of the structures so far there has been an entry point at the top and an exit point at the bottom. There are no jumps into or out of the structure. The entry point has entry conditions that are expected to be satisfied, and exit conditions that are fulfilled if they are. Each of the structures can be considered to be a code block.

The Four Structures of Structured Programming

It is OK that there are several paths within a structure, but from the outside, each structure looks like a code block with one entry and one exit.


QUESTION 13:

Could a code block acting as a loop body be replaced by an if-then-else structure?