The following code block is equivalent to the original code block:
IF ((NOT rainy) OR (NOT tooCold))
{
DISPLAY("It's a good beach day")
}
In the following code block, assume that the variables rainy and tooCold are boolean.
IF ((NOT rainy) AND (NOT tooCold))
{
DISPLAY("It's a good beach day")
}
Which of the following are equivalent to the above code block?
IF ((NOT rainy) OR (NOT tooCold))
{
DISPLAY("It's a good beach day")
}
IF ((NOT rainy) AND tooCold)
{
DISPLAY("It's a good beach day")
}
IF (NOT (rainy OR tooCold))
{
DISPLAY("It's a good beach day")
}
IF (rainy AND tooCold)
{
DISPLAY("It's a good beach day")
}
1 answer