0% found this document useful (0 votes)
28 views5 pages

Flow Chart Handout 2024 2

Uploaded by

rankineesther6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views5 pages

Flow Chart Handout 2024 2

Uploaded by

rankineesther6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

FLOWCHARTS

A flowchart is a visual representation of a process, workflow, or system. It uses various shapes like
rectangles, ovals, and diamonds to represent different steps or actions, and arrows to show the flow and
sequence of these steps. They help in documenting, analyzing, and improving processes by breaking
them down into clear, manageable steps.
Flowcharts are widely used in different fields, from business and engineering to software development,
to simplify complex processes and improve communication.
A flow chart is a graphical representation of an algorithm. They use special geometrical objects to
designate the basic steps of a program, which are:

1. A parallelogram
This is used to represent the input operation as well as the output operation

2. A rectangle
This is used to represent a processing /assignment statement.

3. A diamond
This is used to represent a decision (if-then-else and loops) structure.

4. An elliptical shape
This is used to represent the terminal indicators, START or STOP

5. Directional Arrows
These are used to indicate the flow of the logic in the algorithm.

6.

The connector
1
Control Statements
Sequencing

Sequencing is a part of any programming structure. This is where the program is viewed in a simple top
to bottom manner, from the input statement to the end of the program. Example 1(product program) is
an example of a basic program written in a sequence manner.

Before we look at the selection statement, below are examples of how the various control structures are
depicted in a flowchart.

Sequence

A do A

B do B
Example 1 you are required to read the values of three numbers find the product of the numbers and
output the product.
Start

Read num1, num2,


num3

Product num1 * num2 * num3

Print Product

Stop

2
Selection/Conditional statements (Decision)
In our everyday lives we make simple decisions and important decisions. These decisions that we make
are normally based on a particular condition. For example, if school is keeping you will go to school if
school is not keeping you will stay home. The decision will be made based on the condition of whether
or not “school is keeping”.

No Yes
C
If C is true then
do E
Else
D E
do D

Let us look at a pseudocode algorithm that will show sequencing and selection as well as the flowchart
version of the program.

Example 2
Write a pseudocode algorithm to read two numbers and to print the value of numb1 if it is greater than
numb2 else print numb2.

Pseudocode version Flow chart version

Algorithm Comparison of the bigger value of two variables Start

Start
read numb1, numb2
read numb1,
numb2
if numb1 > numb2 then
Print numb1
else Print No Is numb1 Yes
Print numb2 numb2 Print
endif > numb2
numb1

Stop

Stop

3
Loop (Repetition)
A loop is a sequence of instruction s that is continually repeated until a certain condition is reached.
Conditions are statements that are created by the programmer which evaluates actions in the program
and evaluates if it's true or false.
Definite loops are executed a set number of times.

While F is true
Yes do G
F G

No

Example 3
A simple loop flow chart that accepts a series of numbers, prints each number and terminates when the
last number is entered.

4
Assignment
Draw a flow chart for each question below.

1. A program is required to read three numbers calculate and print their total.
2. A program required to accept the base and height of a triangle, calculate and display the area.
3. Given the current year and year of birth of the user, write a program to compute and display the
user’s age.
4. Draw a flowchart, including START and STOP symbols to illustrate the following:
 Input SCODE
 If SCODE is equal to 0945
 Then add money to the phone
 Otherwise Output ‘ERROR- Code Incorrect’

You might also like