I am looking at this question:
Consider the following program:
if X then RED else if Y then BLUE else if Z then YELLOW else GREEN.
Under which of the following conditions is GREEN executed?
With what proposition will GREEN only be executed here?
If I write this out in code I get:
So with the first one ¬X∧¬Y ∧¬Z
if X then
elseif Y then
elseif Z then
Means "NOT X AND NOT Y AND NOT Z"
So the only conclusion can be NOT RED NOT BLUE NOT YELLOW BUT GREEN.
This is correct right?
But the second one confuses me with the brackets ...
What are the rules regarding that?