26.9k views
0 votes
For which of these values of x, y, and z

I. x is 1, y is 2, and z is 2
II. x is 2, y is 1, and z is 2
III. x is 2, y is 2, and z is 1
is the expression
! (x <= y && ! (y > z && z == x))
false?
A. I only
B. II only
C. III only
D. I and III only
E. I, II, and III

User Praburaj
by
7.4k points

1 Answer

5 votes

Final answer:

The expression is false for values of x, y, and z in option (d) I and III only.

Step-by-step explanation:

To determine for which values of x, y, and z the expression ! (x <= y && ! (y > z && z == x)) is false, we can substitute the given values into the expression.

The expression is false when the condition inside the parentheses (y > z && z == x) is true, and the condition outside the parentheses (x <= y) is false.

I. Substitute x = 1, y = 2, and z = 2 into the expression.

We have ! (1 <= 2 && ! (2 > 2 && 2 == 1)).

The condition inside the parentheses is false, and the condition outside the parentheses is true, so the expression is false.

II. Substitute x = 2, y = 1, and z = 2 into the expression.

We have ! (2 <= 1 && ! (1 > 2 && 2 == 2)).

The condition inside the parentheses is false, and the condition outside the parentheses is false, so the expression is true.

III. Substitute x = 2, y = 2, and z = 1 into the expression.

We have ! (2 <= 2 && ! (2 > 1 && 1 == 2)).

The condition inside the parentheses is true, and the condition outside the parentheses is true, so the expression is false.

Therefore, the expression is false for values of x, y, and z in options I and III only.

User Maxim Eliseev
by
8.9k points