Nowadays, programmers usually don't draw flowcharts for them when they write programs. But in the school computer science course, teachers often still require students to accompany programs with such schemes. It is not difficult to compose them.
Necessary
- - a stencil for drawing flowcharts;
- - mechanical pencil;
- - eraser;
- - paper;
- - a computer with Internet access.
Instructions
Step 1
The beginning and end of the algorithm are indicated by ovals. Inside them are placed, respectively, the words "Beginning" and "End". From the oval, which symbolizes the beginning of the algorithm, one arrow goes down, to the oval, which symbolizes the end of the algorithm, comes the arrow from above.
Step 2
Steps corresponding to non-I / O actions are indicated by rectangles. An example of such an action is calculating by a formula and assigning the result to a particular variable. The arrow from the previous step comes to the rectangle at the top, and the arrow to the next step comes from below it.
Step 3
Parallelograms are used to indicate the steps corresponding to I / O operations. Such operations are of two types: assigning data received from somewhere to a variable and outputting data from a variable to a file, port, screen, printer, etc.
Step 4
Branches are indicated by diamonds. An arrow from the previous step comes to the upper corner of the rhombus, and arrows marked as "No" and "Yes" come from its side corners. They come, respectively, to the steps to be taken if the condition is not met and the condition is met. The lower corner of the rhombus is left free. The condition itself (for example, equality, strict or non-strict) is written inside the rhombus.
Step 5
A rectangle with double sidewalls represents a transition to a subroutine. After the return statement is encountered in the subroutine, the execution of the main program continues. The name of the subroutine is indicated inside the rectangle. The block diagrams of all subroutines are placed under the block diagram of the main program or on separate pages.
Step 6
It is most convenient to draw flowcharts through special stencils, using a mechanical pencil. It can be erased with an eraser like a regular pencil, but no sharpening is required.
Step 7
If you would like to create flowcharts electronically, use an online application called Flowchart. If you wish, you can also master special programming languages, in which the programming process itself consists in drawing up a flowchart. There are two such languages: Dragon and HiAsm.