program zB_1_2;
uses crt;
var x,y,z : string;
xb, yb, zb : boolean;
begin
clrscr;
{Vvodim strokovie dannie}
writeln('VVedite TRUE ili FALSE');
write('VVedite X = '); readln(x);
write('VVedite Y = '); readln(y);
write('VVedite Z = '); readln(z);
if (((x <> 'TRUE') AND (x <> 'FALSE')) OR
((y <> 'TRUE') AND (y <> 'FALSE')) OR
((z <> 'TRUE') AND (z <> 'FALSE'))) then
writeln('vvedeni ne vernie znacheniya!')
else
begin
{preobrazuem v logicheskie}
if (x = 'TRUE') then xb := true;
if (x = 'FALSE') then xb := false;
if (y = 'TRUE') then yb := true;
if (y = 'FALSE') then yb := false;
if (z = 'TRUE') then zb := true;
if (z = 'FALSE') then zb := false;
writeln('-------------------');
writeln('| Virajeniya |');
writeln('--------------------');
writeln('| X OR (NOT Y) = ',(xb or (not yb)));
writeln('--------------------');
writeln('| X OR Y AND Z = ',(xb or yb and zb));
writeln('--------------------');
writeln('| NOT(X AND (NOT Y)) OR X = ',not(xb and (not yb) or xb));
writeln('-------------------------------');
writeln('| Y AND (NOT X) OR (NOT Y) = ',(yb and (not xb) or (not yb)));
writeln('--------------------------------');
writeln('| (NOT Y) AND (NOT X) OR Y = ',((not yb) and (not xb) or yb));
writeln('--------------------------------');
end;
readln;
end.