- Computer programs are uninteresting without a little logic.
- There are three types of "logics" we can do in computer programming: sequencing,
branching, and looping.
- Example of sequencing commands can be viewed in the first chapter: You simply
arrange one command after another. The first command is executed first, then the
second, then the third, and so on.
- Now, we'd like to add a little branching: To make the computer act differently
on different conditions.
- All decent programming languages include at least one special construct for
branching support. C/C++ have two of them.
|