Сделайте замену переменных с условиями. Program asd; USES crt; Const n=4; Var A:array[1..n,1..n] of integer; i,j,s:integer; BEGIN Сlrscr; Randomize; for i:=1 to n do begin for j:=1 to n do begin A[i,j]:=ABS(Random(2)-1); Write(A[i,j]:4); end; Writeln; end; Writeln; for i:=1 to n do begin for j:=1 to n do begin If A[i,j]=0 then A[i,j]:=1 else A[i,j]:=0; Write(A[i,j]:4); end; Writeln; end; END.
Program asd;
USES crt;
Const n=4;
Var A:array[1..n,1..n] of integer;
i,j,s:integer;
BEGIN
Сlrscr;
Randomize;
for i:=1 to n do
begin
for j:=1 to n do
begin
A[i,j]:=ABS(Random(2)-1);
Write(A[i,j]:4);
end;
Writeln;
end;
Writeln;
for i:=1 to n do
begin
for j:=1 to n do
begin If A[i,j]=0 then A[i,j]:=1
else
A[i,j]:=0;
Write(A[i,j]:4);
end;
Writeln;
end;
END.