234k views
1 vote
Which will be displayed after the following process is completed?

Start
Set x = 1
Set y = 2
Set z = 3
If ((x = 1) OR (y = 1) OR (z = 1)) then
Set ans = "T"
Else
Set ans = "F"
End if
Display ans
Stop

(Points : 2) True
False

User Pabdulin
by
6.9k points

1 Answer

5 votes

Answer:

True

Step-by-step explanation:

In this pseudocode the programmer defines 3 variables, x=1, y=2 and z=3, then he creates a conditional that states that if any of the previously defined variables has the value of 1 then a True will be displayed, on the other hand, if none of the variables has the value of 1 then a False will be displayed. In this case x=1, so it will display a True.

User Brabbeldas
by
6.7k points