Cerința
4 puncteVariabilele x, y, z, w și r sunt de tip întreg, iar r memorează inițial valoarea 0. Indicați o secvență echivalentă cu cea de mai jos.
if (x=y) and (z<>w) then r:=1 else if (x=y) and (z=w) then r:=2 else r:=3;
a. if (x=y) or (z<>w) then r:=1 else if (x<>y) or (z=w) then r:=2 else if x<>y then r:=3;
b. if (x=y) or (z<>w) then r:=1 else if (x=y) or (z=w) then r:=2 else r:=3;
c. if (x=y) and (z<>w) then r:=1 else if (x<>y) and (z=w) then r:=2 else if x<>y then r:=3;
d. if x=y then begin r:=1; if z=w then r:=2 end else r:=3;