Which answer choice is equivalent to the following decision?
if a > 12 then

  if b > 8 then

   output "Yes"

  endif

endif
a. if a > 12 OR b > 8 then output "Yes"
b. if a > b then output "Yes"
c. if a > 12 AND a > b then output "Yes"
d. if a > 12 AND b > 8 then output "Yes"

Respuesta :

D. if a > 12 AND b > 8 then output "Yes"
D is the only one that correctly combines those two logic gates. The and statement requires both conditions to be met just as the lengthy piece of code above does.
ACCESS MORE