Overview of control structuresAccording to the structure theorem, any computer program can be written by using the basic control structures as shown in figure below. They can be combined in any way but is necessary to deal with the given problem.
Figure: Control StructuresThe selection structure tests the condition, and then executes one sequence of statements as an alternative of another, depending on whether the condition is true or false. The condition is any variable or expression that returns a Boolean value (TRUE or FALSE). The iteration structure executes a series of statements repetitively as long as a condition holds true. The sequence of structure simply executes a sequence of the statements in the order in which they occur.