A flowchart is a diagrammatic or pictorial or visual representation of an algorithm. It is a diagram which consists of various graphic symbols for representing the nature and flow of steps in a program or process.
The fundamental or basic elements in a flowchart are:
- Start/Stop symbol
- Input/output symbol
- Process symbol
- Decision or Test symbol
- Loop symbol
- Connector symbol
Start/Stop symbol: The start and end symbols indicate the beginning and the end of the flowchart. This symbol looks like a flat oval. Only one flow line is combined with this kind of symbol. Generally this symbol is used twice in a flowchart, that is, at the beginning and at the end. The start/stop symbol is as shown below:
Input/output symbol: The input/output symbol looks like a parallelogram as shown below. This symbol is used to input and output the data. There are two flow lines connected with the input/output symbol. One line comes to this symbol and the other line goes out from this symbol.
Process Symbol: The process symbol looks like a rectangle. It is used for data processing and assigning values to variables. The operations mentioned within the rectangular block will be executed when this kind of block is entered in the flowchart. There are two flow lines associated with this symbol. The process symbol is as shown below:
Decision/Test symbol: The decision symbol is like a diamond/rhombus. This symbol is used to take one of the decisions. Depending on the condition the decision block selects one of the alternatives. While solving a problem, one can take a single alternative or two or multiple alternatives, depending on the situation. A single alternative decision symbol is shown below:
Loop Symbol: This symbol looks like a hexagon. This symbol is used for implementing loops. Four flow lines are associated with this symbol. Two lines are used to indicate the sequence of the program and the remaining two are used to show the looping area, that is from the beginning to the end. Loop symbol is as shown below:
Connector Symbol: The connector symbol is a circle. It is used to establish the connection whenever it is impossible to directly join two parts in a flowchart. Quite often, the two parts of the flowchart may be on two separate pages. In such case, a connector can be used for joining the two parts. Only one flow line is associated with this symbol. It is as shown below:
Problem: Draw a flowchart for adding two integers.
Problem: Draw a flowchart to find the greatest number among two integers.