Open In App

What is a Flowchart and its Types?

Last Updated : 15 Jun, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Flowcharts are nothing but the graphical representation of the data or the algorithm for a better understanding of the code visually. It displays step-by-step solutions to a problem, algorithm, or process. It is a pictorial way of representing steps that are preferred by most beginner-level programmers to understand algorithms of computer science, thus it contributes to troubleshooting the issues in the algorithm. A flowchart is a picture of boxes that indicates the process flow sequentially. Since a flowchart is a pictorial representation of a process or algorithm, it’s easy to interpret and understand the process. To draw a flowchart, certain rules need to be followed which are followed by all professionals to draw a flowchart and are widely accepted all over the countries.

What is FlowChart?

A flowchart is a type of diagram that represents a workflow or process. A flowchart can also be defined as a diagrammatic representation of an algorithm, a step-by-step approach to solving a task.

Flowchart symbols

Different types of boxes are used to make flowcharts flowchart Symbols. All the different kinds of boxes are connected by arrow lines. Arrow lines are used to display the flow of control. Let’s learn about each box in detail.

Symbol Name

Symbol Representation

Terminal/Terminator

Terminal symbol

Process

Process symbol

Decision

Decision symbol

Document
Document Symbol

 

Data or Input/Output

input/output symbol

Stored Data
Stored data symbol

 

Flow Arrow

Flow Arrow symbol

Comment or Annotation 
Comment symbol

 

Predefined process
predefined process symbol

 

On-page connector/reference 

on page reference symbol

Off-page connector/reference 
off page reference symbol

 

 

Uses of Flowcharts in Computer Programming/Algorithms

The following are the uses of a flowchart:

  • It is a pictorial representation of an algorithm that increases the readability of the program.
  • Complex programs can be drawn in a simple way using a flowchart.
  • It helps team members get an insight into the process and use this knowledge to collect data, detect problems, develop software, etc.
  • A flowchart is a basic step for designing a new process or adding extra features.
  • Communication with other people becomes easy by drawing flowcharts and sharing them.

When to Use Flowchart?

Flowcharts are mainly used in the below scenarios:

  • It is most importantly used when programmers make projects. As a flowchart is a basic step to make the design of projects pictorially, it is preferred by many.
  • When the flowcharts of a process are drawn, the programmer understands the non-useful parts of the process. So flowcharts are used to separate sound logic from the unwanted parts.
  • Since the rules and procedures of drawing a flowchart are universal, a flowchart serves as a communication channel to the people who are working on the same project for better understanding.
  • Optimizing a process becomes easier with flowcharts. The efficiency of the code is improved with the flowchart drawing.

Types of Flowcharts

Three types of flowcharts are listed below:

  1. Process flowchart: This type of flowchart shows all the activities that are involved in making a product. It provides a pathway to analyze the product to be built. A process flowchart is most commonly used in process engineering to illustrate the relation between the major as well as minor components present in the product. It is used in business product modeling to help understand employees about the project requirements and gain some insight into the project.
  2. Data flowchart: As the name suggests, the data flowchart is used to analyze the data, specifically it helps in analyzing the structural details related to the project. Using this flowchart, one can easily understand the data inflow and outflow from the system. It is most commonly used to manage data or to analyze information to and fro from the system.
  3. Business Process Modeling Diagram: Using this flowchart or diagram, one can analytically represent the business process and help simplify the concepts needed to understand business activities and the flow of information. This flowchart illustrates the business process and models graphically which paves the way for process improvement.

Types of boxes used to make a flowchart

There are different types of boxes that are used to make flowcharts. All the different kinds of boxes are connected to one another by arrow lines. Arrow lines are used to display the flow of control. Let’s learn about each box in detail.

1. Terminal

This box is of an oval shape which is used to indicate the start or end of the program. Every flowchart diagram has an oval shape that depicts the start of an algorithm and another oval shape that depicts the end of an algorithm. For example:

2. Data

This is a parallelogram-shaped box inside which the inputs or outputs are written. This basically depicts the information that is entering the system or algorithm and the information that is leaving the system or algorithm. For example: if the user wants to input a from the user and display it, the flowchart for this would be:

3. Process

This is a rectangular box inside which a programmer writes the main course of action of the algorithm or the main logic of the program. This is the crux of the flowchart as the main processing codes is written inside this box. For example: if the programmer wants to add 1 to the input given by the user, he/she would make the following flowchart:

4. Decision

This is a rhombus-shaped box, control statements like if, condition like a > 0, etc are written inside this box. There are 2 paths from this one which is “yes” and the other one is “no”. Every decision has either yes or no as an option, similarly, this box has these as options. For example: if the user wants to add 1 to an even number and subtract 1 if the number is odd, the flowchart would be:

5. Flow

This arrow line represents the flow of the algorithm or process. It represents the direction of the process flow. in all the previous examples, we included arrows in every step to display the flow of the program. arrow increases the readability of the program.

6. On-Page Reference

This circular figure is used to depict that the flowchart is in continuation with the further steps. This figure comes into use when the space is less and the flowchart is long. Any numerical symbol is present inside this circle and that same numerical symbol will be depicted before the continuation to make the user understand the continuation. Below is a simple example depicting the use of On-Page Reference

Advantages of Flowchart

  • It is the most efficient way of communicating the logic of the system.
  • It acts as a guide for a blueprint during the program design.
  • It also helps in the debugging process.
  • Using flowcharts we can easily analyze the programs.
  • flowcharts are good for documentation.

Disadvantages of Flowchart

  • Flowcharts are challenging to draw for large and complex programs.
  • It does not contain the proper amount of details.
  • Flowcharts are very difficult to reproduce.
  • Flowcharts are very difficult to modify.

Solved Examples on FlowChart

Question 1. Draw a flowchart to find the greatest number among the 2 numbers.

Solution:

Algorithm:

1. Start 

2. Input 2 variables from user

3. Now check the condition If a > b, goto step 4, else goto step 5.

4. Print a is greater, goto step 6

5. Print b is greater

6. Stop

FlowChart:

Question 2. Draw a flowchart to check whether the input number is odd or even

Solution:

Algorithm:

1. Start

2. Put input a

3. Now check the condition if a % 2 == 0, goto step 5. Else goto step 4

4. Now print(“number is odd”) and goto step 6

5. Print(“number is even”)

6. Stop

FlowChart:

Question 3. Draw a flowchart to print the input number 5 times.

Solution:

Algorithm:

1. Start

2. Input number a

3. Now initialise c = 1

4. Now we check the condition if c <= 5, goto step 5 else, goto step 7.

5. Print a

6. c = c + 1 and goto step 4

7. Stop

FlowChart:

Flowchart to print the input number 5 times

 

Question 4. Draw a flowchart to print numbers from 1 to 10.

Solution:

Algorithm:

1. Start

2. Now initialise c = 1

3. Now we check the condition if c < 11, then goto step 4 otherwise goto step 6.

4. Print c

5. c = c + 1 then goto step 3

6. Stop

FlowChart:

Flowchart to print numbers from 1 to 10

Question 5. Draw a flowchart to print the first 5 multiples of 3.

Solution:

Algorithm:

1. Start

2. Now initialise c = 1

3. Now check the condition if c < 6, then goto step 4. Otherwise goto step 6

4. Print 3 * c

5. c += 1. Then goto step 3.

6. Stop

FlowChart:

Flowchart to print the first 5 multiples of 3



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads