February 2014
Beginner
1248 pages
62h 25m
English
Structured programming promotes simplicity. Only three forms of control are needed to implement an algorithm:
• sequence
• selection
• repetition
The sequence structure is trivial. Simply list the statements to execute in the order in which they should execute. Selection is implemented in one of three ways:
• if statement (single selection)
• if...else statement (double selection)
• switch statement (multiple selection)
In fact, it’s straightforward to prove that the simple if statement is sufficient to provide any form of selection—everything that can be done with the if...else statement and the switch statement can be implemented by combining if statements (although perhaps not as clearly and efficiently).
Repetition ...
Read now
Unlock full access