Flowcharts
A flowchart is a pictorial representation of an algorithm. As it represents a solution in the form of picture, it is easier to understand and develop. A main advantage of flowchart is visibility of paths (or flows) within a solution. Each path (or logical sequence) is clearly visible as arrows are used to represent flow. Before developing flowcharts for example problems, different flowchart symbols must be known. They are shown below.
Last two symbols shown below are useful when flowchart does not fit into single page. For example, symbol
indicate break in current page and corresponding symbol in other page
Denotes continuation of path from another page. Symbol "A" inside circle should match. If they represent same path. below are all symbols used in flowchart
EXAMPLE 1
Problem: Draw a flowchart to find area of circle.
EXAMPLE 2
Problem: Draw a flowchart to find minimum of two numbers.
In the next section, we will discuss some problems for which algorithms and flowcharts are to be developed. It is not always necessary to do both for a given problem. As flowchart explicitly shows the paths, it is easy to develop, compared to algorithm especially problems involving more paths or branches i.e. problem is complex. After all a flowchart is another representation of algorithm i.e. pictorial form. Hence, after some practice directly flowchart can be developed as a solution. In following problems, to provide illustration of both methods, both are done.