Var ar:array[1..15] of byte; i:integer; begin; randomize; writeln('Array:'); for i:=1 to 15 do begin; ar[i]:=random(2); write(ar[i]:4); if ar[i]=1 then ar[i]:=0 else ar[i]:=1; end; writeln; writeln('Final array:'); for i:=1 to 15 do write(ar[i]:4); end.
i:integer;
begin;
randomize;
writeln('Array:');
for i:=1 to 15 do
begin;
ar[i]:=random(2);
write(ar[i]:4);
if ar[i]=1 then ar[i]:=0 else ar[i]:=1;
end;
writeln;
writeln('Final array:');
for i:=1 to 15 do
write(ar[i]:4);
end.