01b - Algorithms (Flowcharts)
01b - Algorithms (Flowcharts)
Basic Programming
Version 2 Version 3a
Input/Output
Start / stop Decision Connector
11/12/2016 Preparedby:
Prepared by: Marilou
sbpolinar
M. Iway, MIT 8
Flowchart
Flow Lines
• indicated by straight lines with arrows
to show the direction of data flow
START
END
• Declaration
– binding of an identifier to the
information that relates to it
– stating a variable name to be used
X = 10
Y = 25
X=Y+Z
A = 18
B=A-2
Get X Display X
T F
Condition
Connectors
Note: These connectors should be used
as little as possible. They should only be
used to enhance readability. Overuse,
however, decreases readability and
produces a cluttered effect.
6. If (Ave%2==0) True
sum = x+y Display
Then Output “EVEN”
“EVEN”
Else Output “ODD”
Ave = sum/2
Stop
A
Start
1. Input x, y
Input x and y
2. sum = x+y
Ave = sum/2 sum = x+y
3. Output Ave Ave = sum/2