var A,B,C,F: boolean;
i,m:integer;
mass: array [1..8,1..4] of string;
begin
writeln ('Таблица истинности:');
writeln('A':7, 'B':7, 'C':7, 'F':7);
i:=0;
For A:=false to true do
For B:=false to true do
For C:=false to true do
begin
F:=not A or ( B = C);
writeln(A:7,B:7,C:7,F:7);
if F=False then begin
i:=i+1;
if A=TRUE then mass[i,1]:='-A' else mass[i,1]:='A';
if B=TRUE then mass[i,2]:='-B' else mass[i,2]:='B';
if C=TRUE then mass[i,3]:='-C' else mass[i,3]:='C'
end;
end;
writeln;
writeln ('СКНФ:');
for m:=1 to i do begin
write('(',mass[m,1], 'v',mass[m,2],'v',mass[m,3],')');
if m<i-1 then write('&');
end;
readln;
end.
dmFyIEEsQixDLEY6IGJvb2xlYW47CmksbTppbnRlZ2VyOwptYXNzOiBhcnJheSBbMS4uOCwxLi40XSBvZiBzdHJpbmc7CmJlZ2luCndyaXRlbG4gKCfQotCw0LHQu9C40YbQsCDQuNGB0YLQuNC90L3QvtGB0YLQuDonKTsKICAgICAgd3JpdGVsbignQSc6NywgJ0InOjcsICdDJzo3LCAnRic6Nyk7CiAgICAgIGk6PTA7CiAgICAgIEZvciBBOj1mYWxzZSB0byB0cnVlIGRvCiAgICAgIEZvciBCOj1mYWxzZSB0byB0cnVlIGRvCiAgICAgIEZvciBDOj1mYWxzZSB0byB0cnVlIGRvCiAgICAgIGJlZ2luCkY6PW5vdCBBIG9yICggQiA9IEMpOwogICAgICB3cml0ZWxuKEE6NyxCOjcsQzo3LEY6Nyk7CiAgICAgCiAgICAgICAgICBpZiBGPUZhbHNlIHRoZW4gYmVnaW4KICAgICAgaTo9aSsxOwogICAgICBpZiBBPVRSVUUgdGhlbiBtYXNzW2ksMV06PSctQScgZWxzZSBtYXNzW2ksMV06PSdBJzsKICAgICAgaWYgQj1UUlVFIHRoZW4gbWFzc1tpLDJdOj0nLUInIGVsc2UgbWFzc1tpLDJdOj0nQic7CiAgICAgIGlmIEM9VFJVRSB0aGVuIG1hc3NbaSwzXTo9Jy1DJyBlbHNlIG1hc3NbaSwzXTo9J0MnCiAgICAgIGVuZDsKICAgICAgZW5kOwogICAgIAogICAgIHdyaXRlbG47CiAgICAgd3JpdGVsbiAoJ9Ch0JrQndCkOicpOwogICAgIGZvciBtOj0xIHRvIGkgZG8gYmVnaW4KICAgICB3cml0ZSgnKCcsbWFzc1ttLDFdLCAndicsbWFzc1ttLDJdLCd2JyxtYXNzW20sM10sJyknKTsKICAgICBpZiBtPGktMSB0aGVuIHdyaXRlKCcmJyk7CiAgICAgIGVuZDsKICAgICAgCiAgICAgIHJlYWRsbjsKZW5kLg==