Skip to content

Flowcharts

Are you having trouble visualizing how your program works? Flowcharts are a great way to visualize the flow of your program and how the different parts of your program interact with each other. They are a great tool for planning out your program before you start coding. Although, if you don’t want to make one, that’s fine too as I don’t always make flowcharts for my programs.

Common Flowchart Symbols

Flowcharts use different symbols to represent different parts of your program. Here are some common flowchart symbols that you will encounter when creating flowcharts:

SymbolNameFunction
TerminalUsed to denote the beginning and ending of a flowchart.
FlowlinesUsed to show the next step in the flowchart.
PreparationUsed for declaring and initializing variables and/or constants.
Input/OutputUsed for entering data and for displaying the results.
ProcessRepresents a process or action that is performed in your program.
Decision-MakingUsed for branching. Shows which alternative will be followed by the flowchart.
ConnectorUsed to connect a part of a flowchart to another without the need of very long flowlines.
SubroutineRepresents a function or a subroutine in your program.

Flowchart Examples

  1. Flowchart for a simple program that prints “Hello World”:
START
START
print "HeLLo WoRld"
print "HeLLo WoRld"
END
END

Sample Output:

HeLLo WoRld
  1. Flowchart that will show a name and age:
START
START
print "Name: John Doe"
print newline
print "Age: 20"
print "Name: John Doe"...
END
END

Sample Output:

Name: John Doe
Age: 20
  1. Flowchat where the user will input their age and display “You’re too young to drink” if the age is 17 or less, or print “You can drink” if the age is 18 or more:
START
START
print "My age is "
print "My age is "
END
END
age
age
get age
get age
Yes
Yes
No
No
is
age <= 17
?
is...
print "You're too
young to drink"
print "You're too...
print "You can
drink"
print "You can...

Sample Output:

Enter your age: 17
You're too young to drink
  1. Flowchart that has a function that will return the sum of two numbers:
START
START
END
END
num1, num2, result
num1, num2, result
print "First Number: "
print "First Number: "
get num1
get num1
print "Second Number: "
print "Second Number: "
get num2
get num2
AddNumbers
AddNumbers
print "The sum is " + result
print "The sum is " + result
AddNumbers
AddNumbers
result = num1 + num2
result = num1 + num2
END
END

Sample Output:

Enter the first number: 5
Enter the second number: 10
The sum is 15