Flowcharting
Flowcharting
Computer Programming
1
Hi! I am Ma’am Jhaz
Your IT Instructor
2
Lecture 3
3
FLOWCHART
4
What is a Flowchart?
• Flowchart is a representation of the algorithm using standard
symbols.
• A flowchart is a graphical representation of a sequence of
operation.
• A flowchart contains symbols describing how an algorithm or
program operates.
• A flowchart has steps are linked by connecting lines and
directional arrow
5
Process block
Connector
Decision block
Flowchart Lines
➢ Flow lines indicated by straight lines with arrows to show
the direction of data flow
➢ Used to connect blocks by exiting from one and entering
another
Terminal Block
➢ Ovals or rounded rectangles are used to indicate the start
and the end of a module or program
START
END
Initialization Block
➢Used for declaring/initializing variables needed to
solve a certain process
DECLARATION
- stating a variables name to be used
INITIALIZATION
- to set (a starting value of a variable)
Initialization Block
DECLARATION INITIALIZATION
Num1, Num1=5
Num2 ,
Num2=3
Process Block
➢The rectangle indicates a processing block, for
such things as calculations, opening and closing
filers, and so fort
Sum=Num1+Num2
Input/Output Block
➢The parallelogram indicates input to and output operation
INPUT OUTPUT
Display
Get X X
Decision Block
➢The diamond indicates a decision
➢It has one entrance and exactly two exits from the block
➢One exit is the action when the result is TRUE and the other
exit its action when the result is FALSE
CONVENTION
T F TRUE FALSE
Conditi
on T F
YES NO
Action when Action when Y N
TRUE FALSE
A
NOTE:
– these connectors should used
as little as possible
- they should only be used to
enhanced readability. Overuse,
however, decreases readability
and procedures a cluttered
A effect.
Example:
1. Create a flowchart that display “Hello”.
START
Algorithm Print
“Hello”
1. Print “Hello”
END
Example
START
Algorithm
1. Compute for the sum of 2 and 5;
Sum=2+5 Sum=2+5
2. Print Sum
Print Sum
END
START
Example: Sum=0;
3. Create a flowchart that ask the user Num1,
Num2
to enter two number. Compute and
display the sum. Enter
Num1;
Algorithm Enter
1. Enter 1st number Num2;
(num1)
2. Enter 2nd number Sum=Num1+Num
(num2) 2
3. Compute for the sum of
num1 and num2
Sum=num1+num2
Print Sum
4. Print Sum
END
Exercises:
Make an algorithm and a flowchart of the following:
1. Create a flowchart that will compute for
the average score of a student based on
three quizzes.
Prepared By:
Mrs. Jasmin Garces Geronaga
Thank you… 😉