Structured Programming Techniques

The following sections explain each of the three structured programming constructs. Read them carefully and you'll see that the concept of a structured program is easy to understand. Learning about structure before learning a language should help you think of structure as you develop your programming skills.

Sequence

Sequence is nothing more than two or more instructions one after the other. Sequential instructions are the easiest of the three structured programming constructs because you can follow the program from the first statement to the last within the sequence. Figure 22.4 uses flowcharting to demonstrate sequence logic.

Here is a pseudocode description of the flowchart as you follow the flowchart from ...

Get Absolute Beginner's Guide to Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.