Assignment 2-2.1.1 Problem-Solving and Design
Assignment 2-2.1.1 Problem-Solving and Design
Page 1 of 3
Computer Science Assignment # 2
2.1 Algorithm Design and Problem Solving
[8]
Page 2 of 3
Computer Science Assignment # 2
2.1 Algorithm Design and Problem Solving
START
Count = 1
INPUT
Number
Yes
Is Number = 0
OUTPUT Count
?
No
STOP
Count = Count + 1
(a) Draw a trace table to show the output from the flowchart for the following sets of
input:
12, 42, 60, 56, 72, 128 [10]
(b) Explain the purpose of this algorithm. [3]
Page 3 of 3