: , . not, and or. , :
= { },
B = { },
C = { },
D = { V },
E = { V }.
, , :
n not (A)
n A and B A&B
n A or B A B
, :
A&E ,
& ,
D .
dz , , . ? , , ( = 1), ( = 0). , ( = 0), ( = 1). ,
& & = 1.
, :
& & C = 1
& A & D = 1.
, :
( & & ) & ( & & C) & ( & A & D) = 1
, :
& & B & & & A & & B & & A & D
& & & C & & A & & & C & A & D
& E & B & & & & E & B & & A & D
& E & &C & & & E & B & C & A & D = 1.
& = 0 ( ), ( ) :
& & B & & & = 0
& & & C & & = 0
& E & B & & A & D = 0
& E & B & C & A & D = 0
, , :
A & B = 0, A & & B & & A & D = 0,
C & D = 0, A & & & C & A & D = 0,
E & C = 0, & E & &C & & = 0.
( ?)
:
& E & B & & & = 1, .
. . .
|
|
program logic1;
uses crt;
const a1 = . ;
b1 = iii. ;
c1 = III ii. ;
d1 = IV ii. ;
e1 = V ii. ;
var
a,b,c,d,e: boolean;
function answer: boolean;
begin
answer:= (not (a)) and (e) and (b) and (not(c)) and (not a) and (not d);
end;
begin
clrscr;
for a:= false to true do
for b:= false to true do
for c:= false to true do
for d:= false to true do
for e:= false to true do
begin
if answer = true then
begin
writeln(a, ,b, ,c, ,d, ,e, ,answer);
if a = true then writeln(a1);
if b = true then writeln(b1);
if c = true then writeln(c1);
if d = true then writeln(d1);
if e = true then writeln(e1);
end;
end;
writeln;
readln;
end.
, , answer , , , .
. , , .