4 The Pseudocode Algorithm
4 The Pseudocode Algorithm
Program Design
Algorithms(Pseudocode)
OBJECTIVES
– Flowchart
– Narrative
WHAT IS THE PURPOSE OF A
PSEUDOCODE?
Read num1
Read num2
Accept two numbers and print the
total
Or
Accept NUM1,NUM2
STATEMENTS:ASSIGNMENT STATEMENT
PSUEDOCODE:
IPO CHART: Processing
Assignment Statement
PROCESSING
sum
1. Accept num1 + num2
NUM1,NUM2
2.Calculate total
TOTAL NUM1
+NUM2+NUM3
3. Print TOTAL
ARITHMETIC OPERATORS
PSUEDOCODE: Output
IPO CHART: Output
Statement
OUTPUT
Print “The sum of the numbers
is”, sum
Print TOTAL
Create an algorithm
which calculates the
average of 3 numbers