fork download
  1. var A,B,C,F: boolean;
  2. i,m:integer;
  3. mass: array [1..8,1..4] of string;
  4. begin
  5. writeln ('Таблица истинности:');
  6. writeln('A':7, 'B':7, 'C':7, 'F':7);
  7. i:=0;
  8. For A:=false to true do
  9. For B:=false to true do
  10. For C:=false to true do
  11. begin
  12. F:=not A or ( B = C);
  13. writeln(A:7,B:7,C:7,F:7);
  14.  
  15. if F=False then begin
  16. i:=i+1;
  17. if A=TRUE then mass[i,1]:='-A' else mass[i,1]:='A';
  18. if B=TRUE then mass[i,2]:='-B' else mass[i,2]:='B';
  19. if C=TRUE then mass[i,3]:='-C' else mass[i,3]:='C'
  20. end;
  21. end;
  22.  
  23. writeln;
  24. writeln ('СКНФ:');
  25. for m:=1 to i do begin
  26. write('(',mass[m,1], 'v',mass[m,2],'v',mass[m,3],')');
  27. if m<i-1 then write('&');
  28. end;
  29.  
  30. readln;
  31. end.
Success #stdin #stdout 0s 5264KB
stdin
Standard input is empty
stdout
Таблица истинности:
      A      B      C      F
  FALSE  FALSE  FALSE   TRUE
  FALSE  FALSE   TRUE   TRUE
  FALSE   TRUE  FALSE   TRUE
  FALSE   TRUE   TRUE   TRUE
   TRUE  FALSE  FALSE   TRUE
   TRUE  FALSE   TRUE  FALSE
   TRUE   TRUE  FALSE  FALSE
   TRUE   TRUE   TRUE   TRUE

СКНФ:
(-AvBv-C)(-Av-BvC)