CMP011 Flowchart PseudoCode
CMP011 Flowchart PseudoCode
Flowchart
the sequence in which data are read, computing is performed, decision is made and results are
obtained.
The first formal Flowchart is attributed to John Von Neumann in 1945. The flowcharts are
read from left to right and top to bottom. Program flowcharts show the sequence of
simple and easy to learn. Flowchart symbols have been standardized by the American
3. Do not chart every detail on the flowchart. Only a graphic representation step of the
program. A reader who is interested in greater detail can refer to the program itself.
7. keep the flowchart as simple as possible. The crossing of flowlines should be avoided
as far as practicable.
1
8. If a new flowcharting page is needed, it is recommended that the flowchart be broken
at the input or output point. Properly labelled connectors should be used to link the
Flowchart Symbols
1. Terminal
This symbol is used to denote the beginning and the end of a flowchart; it is annotated
2. Flow line
This symbol shows the flow of work in a process, normal flow is from top to bottom and
left to right.
3. Process Symbol
This symbol is used to define the execution of an operation i.e. addition, average, subtraction,
etc.
4. Input/ Output
This symbol represent input of data for processing and output of information i.e. Read and
write statement.
5. Connector Symbol
This is used to represent a junction at which the flowchart comes from or where the flow
6. Decision Symbol
2
This symbol is used to express any condition that might provide alternate paths of flow
through the program. If the condition is based on YES or NO possibility, two exit lines show
7. Predefined process
This is widely used in diverse programs when a subroutine or a series of steps for a particular
start
Input radius
Print Area
Print
Circumference
stop
3
Example 2: Draw a flowchart to calculate the average of the twenty numbers
start
Input first
number
Count = count + 1
Sum = first number + sum
Input next
number
Count = count + 1
Sum = next number + sum
Is count
<= 20
No
?
Yes
Average = sum/20
Print average
stop
4
Pseudo code
Pseudo-code is an informal way to express the design of a computer program. Pseudo code is
another programming analysis tool that is used for planning program logic. “Pseudo” means
imitation or false and “Code” refers to the instructions written in a programming language.
These pseudo-instructions are phrases written in ordinary natural language (e.g English,
French, German, etc.). Instead of using symbols to describe the logic steps of a program, as in
flowchart. Pseudo code uses a structure that resembles computer instructions. Because it
emphasizes the design of the program, pseudo code is also called Program Design
Language (PDL).
Pseudo code is made up of the following basic logic structures that have been proved to be
1. Sequence
Sequence logic is used for performing instructions one after another in sequence. Thus, for
sequence logic pseudocode instructions are written in the order, or sequence, in which they
are to be performed. The logic flow of pseudocode is from top to bottom. \sequence logic,
also called DECISION LOGIC is used for making decisions. It is used for making
decisions. It is used for selecting the proper path out of the two or more alternative paths in
5
Iteration logic is used to produce loops. When one or more instructions may be executed
several times depending on some condition. It uses two structures called the DO… WHILE
ADVANTAGES
3. Writing of pseudocode must involves less time and effort than drawing an equivalent
because it has only a few rules to follow allowing the programmer to concentrate on
LIMITATION
compared to flowcharting.