Algorithms are normally represented in two basic ways i.e using pseudocodes and using flowcharts.

Pseudocodes are used to represent algorithms textually using a combination of a higher level language and some basic programming constructs.

Flowcharts, on the other hand are used to represent the steps in an algorithm visually.

A flowchart is a diagrammatic  representation  which illustrates the solution model of a computation problem. Flowcharts shows the steps using some established shapes. Arrows are used  to connect the shapes.

Shapes and Symbols used in  flowcharts

Flow lines

flowchart's  right and bottom arrow symbols

Used to show the next step in the flowcharts flow, the default flow is from left to right and top to bottom. By convention, the arrow head are only shown  when the flow lines go contrary to the normal.


Flowchart's terminal symbol

The rounded rectangle is used to show the flowcharts starting and ending points


Flowcharts input/output symbol

The parallelogram symbol is used to designate an input or output operation. 


flowchart's processing symbol

The rectangle is used to show that the computer is performing a certain operation  e.g  mathematical computation.


flowchart's ecision symbol

The diamond symbol is used to show the true/false condition being tested when a logical branch is encountered.

On-Page Connector

flowcharts on-page connector symbol

A circle with a small letter or number inside is used to connect  flowcharts in the same page.  This usually happens when a flowchart doesn't fit in a given section of a page.


Off-page Connector

flowcharts off-page connector symbol

This symbol is used to connect parts of a flowchart which spans in multiple pages.


There are several other symbols used to represent advanced features and operations.

Examples of programming flowcharts

A flowchart for a program to add two numbers:

a flowchart to calculate sum of two numbers

Flowchart of a program to  print the larger of two numbers:

a flowchart of a program to print the largest of two numbers

The section below shows pseudocode for the above flowchart.

input number1
a ← number1
input number2
b ← number2
if a > b :
   print a
else :
   print b


A flowchart to print  the largest of three numbers:

A flowchart for printing the largest of three numbers

The pseudo-code for the above flowchart:

input number1, number2 & number3
a, b, c ← number1, number2, number3 
if a > b :
   if a > c:
      print a
    if b > c :
       print b
       print  c


Advantages of flowcharts 

  1. They are used as a guide to programmers  during the writing of the source code in a high-level language.
  2. They can be used in the debugging process to locate a flaw in the programs implementation.
  3. They offer an intuitive model to communicate  the logic of the program.
  4. Flowcharts can be used as a guide during the testing process
  5. Can be referenced during future program maintenance

Disadvantages of flowcharts

  1. Designing flowcharts is a time-consuming process.

  2. Designing flow charts for complex programs  can get more tedious than the actual implementation of the program.

  3. It is hard to modify an existing flowchart.