What is a flowchart?

Overview

A flowchart is a diagram that shows the flow of information for a process/workflow. Therefore, it's also known as a process flow diagram. This flow of information, and it's subsequent processing, is depicted using various connected symbols.

In software engineering, flowcharts show the flow of information for algorithms. However, note that flowcharts are drawn independently of any programming language.

Application

Flowcharts are applicable in every domain, but we'll focus on software engineering. Flowcharts help with:

  • To document a process/algorithm and the sequence of steps it contains.
  • To provide a visual implementation of the program/algorithm's logic.
  • To troubleshoot and track errors in the process/algorithm.
  • To test the program using various inputs.

Components

While flowcharts can represent all different kinds of information flows, they do so using the symbols that are illustrated below. Additional symbols are used, but these are specific to the process/program whose flow we're modeling.

Flowchart symbols
  • Terminal: Depicted by an oval, this symbol marks the start, end, and halt (in the case of error messages, for example) of the program.

Note: The terminal symbol is always the first and last element of the flowchart.

  • Input/Output: Depicted by a parallelogram, this symbol marks the functions of input/output in the program.
  • Process: Depicted by a rectangle, this symbol is also referred to as the Action symbol. It shows when an action, process, or function (for example, arithmetic operations)Operations such as addition, subtraction, division, multiplication is applied to the data.
  • Decision: Depicted by a diamond, this symbol shows points in the program where a decision is to be made based on a condition.
  • Flow line: Depicted by an arrow, this symbol depicts the flow of information in the program and shows the relationship between the various symbols.

Example

Suppose we've got a program that inputs an integer, a, and outputs whether the integer is odd or even. The flowchart for this program is illustrated below:

Flowchart determining whether an integer is odd or even

We have a terminal symbol that depicts the start of the program, which leads to an input/output symbol for the input, and it leads to a process symbol for calculating the value of a%2 and assigning it to even. This is followed by a decision symbol which determines if the value of even is 0. There are then two input/output symbols following the decision symbol:

  • One input/output symbol is to output "Even" if even is 0.
  • One input/output symbol is to output "Odd" if even is not 0.

Finally, the terminal symbol depicts the end of the program.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved