Professional Documents
Culture Documents
Computer Programming
FLOW CHART
Flow Charts
Algorithm for large problems becomes
complex and thereby difficult to write the code.
Problem analysts found ‘Flow charts’
Read a
Here ‘a’ is the variable where the value of
Input is stored
Writing Expressions in
Computer Language
2. To produce output :
The following symbol is used to print one or
more outputs.
Print a
,b
b
Examples:
Flow Charts
5. A Class has four
exams. Draw a flowchart
that will read in the value
of four exams and output
the student’s average.
b
Examples:
Flow Charts
6. Draw a flowchart that determines if an
inputted number is odd or even.
b
Basic Control Structure of
a Flowchart
Most of the times some part of the program needs to
be repeated at a specified number of times or until a
condition is satisfied, the process is called looping. It
makes the flow of control in a program dependent on
the value of the specified condition.
1. Sequence (begin..end or start..stop)
In this kind of structure the steps involved follow
each other one after It should be noted however
that every flowchart begins and ends with this kind
of notation.
Basic Control Structure of
a Flowchart
2. Decision
(if..then..else)
Part of the flowchart
that employs two or
more possible
alternative solution
and one of which will
be chosen for
execution depending
on the value of the
given condition.
Basic Control Structure of
a Flowchart
3. Loop (while..do, repeat ..until)/Iteration
Loop is part of the flowchart that repeats at
a specified number of time. This process is
called looping. It can be made to stop
when a certain condition is met or stop at a
specified number of repetitions. A counter
is needed to keep track at the number of
times a loop is executed. Failure to set the
condition will cause the loop to iterate
indefinitely.
Basic Control Structure of
a Flowchart
Designing a Loop
There are three things to consider in
designing a loop:
1. The body
2. The initializing statement
3. The conditions for terminating a loop
Methods for Terminating a
Loop
There are various ways of terminating a
loop. Each way depends on the given
condition of the problem