Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

c.

Flowcharts
It is a diagram used to give details on how programs and procedures are executed. Flowcharts
are drawn using specific symbols, each with its own meaning, as given below:
Symbol Explanation
Process Symbol - Indicates where some form of processing occur

Arrow -Shows directional flow of data (data flow symbol)


Input /output - Parallelogram in shape. Indicates where data is entered
and output form, either screen display or printout.
Terminal - Oval in shape. Indicate the start and stop of a program.
Therefore it is written either Start/Begin/Stop/End.
Connector - Circular in shape. Denotes the start and end of a
subroutine. Nothing should be written inside it.
Pre-defined process Indicates a module/subprogram/procedure inside another
program
Decision Represents a selection stage. Often used where a
condition is, especially in repetition and selection
structures.

Illustrations of flowcharts for programs


1. Using Simple Sequence Structure

Flowchart

Start
Enter number, A
Enter number, B
Sum = A + B
Display Sum
Stop
2. Using Selection Structure

3. Using Iteration
(a) Repeat ... Until Structure
Flowchart Pseudocode equivalent
Sum, Average, Count = 0
Repeat
Enter Number
Sum = Sum + Number
Count = count + 1
Until Count > 10
Average = Sum / count
Display Sum, count, Average
End
b) WHILE...WEND Structure and the FOR...TO...NEXT Loop

Flowchart Pseudocode equivalent


Sum, Average, Count = 0
WHILE Count <=10
Enter Number
Sum = Sum + Number
Count = count + 1
WEND
Average = Sum / count
Display Sum, count, Average
END

Use of the Pre-defined Symbol and the connector


This is used when drawing flowcharts of subprograms as given below.
Start Module Accept Numbers
Enter First Number, A
Enter Second Number, B
Enter Third Number, C
End Module

c. Pseudocode for module Accept


Numbers

b. Flowchart for module


a. Flowchart for whole Accept Numbers
program

You might also like