You are on page 1of 1

- 14 -

(g) The pseudocode below will calculate and output the number of participants and the average

DO NOT WRITE IN THIS AREA


age of all participants attending the ICT symposium. The algorithm will terminate and
display the output when an age of 999 is entered.

MOST appropriate variables and/or reserve words.

Start
Set COUNT 0
Set AGE 0
Set AVERAGE 0
Set TOTAL 0

__________________________ “Enter Participant’s age”


1

Read AGE
WHILE AGE <> _______________________ _______________________
2 3

DO NOT WRITE IN THIS AREA


Set TOTAL TOTAL + AGE

Set COUNT COUNT + __________________________________


4

Set _______________________ TOTAL / COUNT


5

Write “Enter another age or 999 to terminate the program”

Read _______________________
6

_______________________
7

Write “The Number of Participants are: ” , __________________


8

Write “The average age of Participants are: ” , __________________ DO NOT WRITE IN THIS AREA
9

_______________________
10

GO ON TO THE NEXT PAGE


01229020/J/CSEC 2021
‘‘*’’Barcode Area”*”
Sequential Bar Code

You might also like