Flowcharts Pseudocode
Zawar Hussain
Algorithms
All computing problems
can be solved by executing a series of actions in a specific order
Algorithm
A procedure determining the
Actions to be executed
Order in which these actions are to be executed
Program control
Specifies the order in which statements are to executed
7. If the
car does not start
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Pseudocode
Pseudocode
Pseudo-code Primitives
Three basic kind of operations:
Sequential
Computation ( Set )
Input/Output ( Get ... / Print ... )
Conditional
If Else
If
Iterative / looping
Repeat ...
While ...
Ghulam Ishaq Khan Institute of Engineering Sciences and Technology, Topi
Control Structures
Sequential execution
Statements executed one after the other in the order written
Transfer of control
When the next statement executed is not the next one in sequence
Easy Sub-problem
Hard Sub-problem
Easy Sub-problem
Easy Sub-problem
Easy Sub-problem
5
C
9(F
32)
Output
Inputs
Process
Input
output
Process
1.
2.
3.
4.
5.
6.
Flow Charts
Name
Terminal
Flow-line
Function
Represents the beginning or end of a
program.
Represents the flow of logic.
Process
Input/Output
Decision
Flow Charting
Decision
Processing
Steps
Terminator
Flow
of
data
Connectors
C
5
(9
F
3
2
)
Begin
Get temp. in F
Calculate
Print C
Stop
Yes
More students?
No
Stop
START
INPUT
A, B
Add A to B
and store in C
BEGIN Adder
Input A and B
C = A + B
PRINT C
END Adder
OUTPUT
C
END
Natural language
Flowchart
Pseudo-code
Questions?