You are on page 1of 20

FLOWCHARTING

FLOWCHART
• Graphical representation of a step-by-step
process in solving a problem.
SYMBOLS USED
IN
FLOWCHARTING
Terminal Symbol (Terminator)
• It is used to show the start and end of a
flowchart. Every flowchart must begin
and end with this symbol.

START
Process Symbol
• It is used to show a process such as
formulas, functions, and other
computational steps.

rem = 56 mod 4
Preparation Symbol
• It is used to initialize variables needed in
the program. Usually, we initialize
variables to 0 for numbers or “ ” for
characters.
score1=0,
score2=0
FirstName=“ ”,
dept=“SITE”
Input/Output Symbol
• It is used to input and output operations

PRINT “Enter
input num1
a number:”
Decision Symbol
• It is used for decision making and for
branching operations.

Is age >= YES


18

NO
On-page connector
• It is used to connect one part of the
flowchart to another within the same
page.
• Use the same label of connector to show
continuity

P
Off-page connector
• It is used to connect one part of the
flowchart to another within the same
page.
• Use the same label of connector to show
continuity

C
Flowline
• It is used to show the flow (or sequence)
of the flowchart.
Problem 1
• Prepare a flowchart of a program that will
accept two numbers, get the sum of two
numbers and then print the sum.
A
START

Solution sum = num1 + num2

num1=0,
num2=0,
sum=0
PRINT “The
sum is: ”
PRINT sum
PRINT “Enter
first number”

END
INPUT num1

PRINT “Enter
second number”

INPUT num2

A
Problem 2
• Prepare a flowchart of a program that will
get the area of a TRIANGLE

• FORMULA
A = (base × height) / 2
A
START

Solution area= (base*height)/2

base=0,
height=0,
area=0
PRINT “The
area of the
triangle is: ”
PRINT area
PRINT “Enter
Base:”

END
INPUT base

PRINT “Enter
Height:”

INPUT height

A
Problem 3
• Create a flowchart of a program that will
compute for the Average Quiz of high
school students. They are given 5 quizzes
every period.
A
START
B
PRINT “Enter
quiz1=0, Quiz3 score: ”
quiz2=0,
quiz3=0,
quiz4=0, average = (quiz1 +
quiz5=0, INPUT quiz3 quiz2 + quiz3 + quiz4
average=0 + quiz5) / 5

PRINT “Enter PRINT “Enter


Quiz1 score: ” Quiz4 score: ”
PRINT “The
Average Quiz
INPUT quiz1 INPUT quiz4 is: ”
PRINT average

PRINT “Enter
PRINT “Enter Quiz5 score: ”
Quiz2 score: ” END

INPUT quiz5
INPUT quiz2

B
A
Problem 4 (Seatwork)
• Draw a flowchart for a simple Grading
System. Inputs are Student’s Name, Year
& Section, Class Standing, Average Quiz,
and Periodic Test. Average Grade will be
30% of CS, 30% of AQ, and 40% of PT.
Display the Student’s Name, Year &
Section and Average Grade.
A
START
B
PRINT “Enter
Class Standing
cs=0, aq=0, Grade:”
pt=0,
average=0,
name=“”, INPUT cs average = (cs * .30) +
yrsec=“” (aq * .30) + (pt * .40)

PRINT “Enter PRINT “Enter


Name: ” Ave Quiz Grade:

PRINT name
INPUT aq PRINT yrsec
INPUT name
PRINT “The
Average Grade
PRINT “Enter is: “
Periodic Test PRINT average
PRINT “Enter Year &
Section: ” Grade: ”

INPUT pt
INPUT yrsec
END
B
A
A
START

a=l*w
length=0,
width=“”,
area=0

PRINT “The area


is: ”
PRINT “Enter
length: ”

PRINT area

INPUT length

END
PRINT “Enter
width: ” Flowchart
In getting
INPUT width the area of a
triangle
A

You might also like