A) A&B∨!A&A∨B&A∨B&!B∨!A&!B=A&B∨0∨B&A∨0∨!A&!B=A&B∨!A&!B
б) !(A&B)&!(C&!A)&!(B&!C)=!(A&B)&(!C∨!!A)&(!B∨!!C)=!(A&B)&(!C∨A)&(!B∨C)= !(A&B)&(!C&!B∨A&!B∨A&C∨!C&C)=!(A&B)&(!C&!B∨A&!B∨A&C∨0)= !(A&B)&!C&!B∨!(A&B)&A&!B∨!(A&B)&A&C=(!A∨!B)&!C&!B∨(!A∨!B)&A&!B∨ (!A∨!B)&A&C=!A&!C&!B∨!B&!C&!B∨!A&A&!B∨!B&A&!B∨!A&A&C∨!B&A&C= !A&!C&!B∨!C&!B∨0∨A&!B∨0∨!B&A&C=!C&!B&(!A∨1)∨!B&A&(1+C)= !C&!B&1∨!B&A&1=!C&!B∨!B&A=!B&(!C∨A)
В)
A B C !A (!A∨B) F
0 0 0 1 1 0
0 1 0 1 1 0
1 0 0 0 0 1
1 1 0 0 1 0
0 0 1 1 1 1
0 1 1 1 1 1
1 0 1 0 0 0
1 1 1 0 1 1
Program gt;
var s:string;
l:integer;
begin
readln(s);
l:=length(s);
writeln(s[1]);
writeln(s[l],' ',s[l]);
end.
Const n=15;
var a:array[1..n] of integer;
i,k,max:integer;
begin
Randomize;
writeln('Массив A:');
for i:=1 to n do
begin
a[i]:=random(33)-15;
write(a[i]:4);
end;
writeln;
k:=0;
max:=-999;
for i:=1 to n do
begin
if a[i] mod 2 = 0 then k:=k+1;
if (a[i]>max)and(a[i]<0) then max:=a[i];
end;
writeln('k = ',k,' max = ',max);
end.
Пример:
Массив A:
14 5 5 7 -10 -13 -3 10 5 -2 -4 -5 3 -10 -14
k = 7 max = -2