Var x,a,b,c:boolean; beginwriteln('a':6,'b':6,'c':6 , 'x':6); for a:= false to true do begin for b:= false to true do begin for c:= false to true do begin x:= (not(a) and b and c ) or (a and b and not(c) )or (a and b and c ); writeln(a:6,b:6,c:6 , x:6); end;end;end;end.
Вычисляем значение выражения (45/9)²-(36-14)х2 в двоичной системе счисления по шагам. 1. 45 / 9 = 101101₂ / 1001₂ - деление производим "в столбик" Результат приведен во вложении. он равен 101₂
beginwriteln('a':6,'b':6,'c':6 , 'x':6);
for a:= false to true do begin
for b:= false to true do begin
for c:= false to true do begin
x:= (not(a) and b and c ) or (a and b and not(c) )or (a and b and c );
writeln(a:6,b:6,c:6 , x:6);
end;end;end;end.