People plan their lives by making decisions, and so do programs. Figure 7.1 is a flow chart. A flow chart is defined as a pictorial representaion of how to plan the stages of a program. It helps you to visualize what decisions need to be made to accomplish a task. According to computer science books, a good language allows you to control the flow of your program in three ways:
Execute a sequence of statements.
Based on the results of a test, branch to an alternative sequence of statements.
Repeat a sequence of statements until some condition is met.
Figure 7.1. A ...