In the remainder of this course, we use a graphic representation of programs called flowchart. A flowchart has several advantages:
Each symbols of the ISO 5807 standard is presented below.
A box with rounded edges represents the beginning or the end of a branch of a flowchart.
An internal treatment, a calculation, an elementary processing is represented by a rectangle.
The reading or writing of an external element, for example the keyboard, the screen, an external actuator data on the network, etc is represented with a parallelogram:
Callig a sub-program is represented by a rectangle with doubled sides. Note that in C, subprograms do not exist, they are called functions.
Conditional branches, usually called tests, are represented by a diamond. The small circle represents the negation, as on logic gates. This is the branch that is executed if the test is false:
The direction of the connections must be from top to bottom. If this direction is not respected, it is necessary to arrow the link.
Here is an example of a flow chart, you should normally understand how it works without difficulty:
What is the purpose of a flowchart?
Who is a flowchart intended for?
How to represent the branch of a test that will be executed if it is false?
Should we put arrows on the links?