You are on page 1of 2

CIT DEPARTMENT

INFORMATION TECHNOLOGY
FORM 5
POP-QUIZ

NAME: ________________________________________________ BLOCK: ________

1. Write a pseudocode algorithm that will accept two numbers in variables T and Z. Exchange the
values and output from them afterwards. Ensure to declare and initialize each variables.
(20 Marks)
CIT DEPARTMENT
INFORMATION TECHNOLOGY
FORM 5
POP-QUIZ

ANSWER KEY DATE:

Start [1]

Declare T, Z, X as real [2]

T = 0 [2]

Z = 0 [2]

X = 0 *** [2]

Print “Please enter two numbers.” [1]

Read T, Z [2]

X = T [1]

T = Z [1]

Z = X [1]

Print “The new value of T is ”, T [2]

Print “The new value of Z is ”, Z [2]

Stop [1]

*** Only suitable variable name must be accepted.

You might also like