Var A:array [1..1000] of integer; i,n:integer; Begin Readln(n); For i:=1 to n do begin A[i]:=Random(2); Write(A[i],' '); end; Writeln; For i:=1 to n do begin if A[i]=1 then A[i]:=0 else A[i]:=1; Write(A[i],' '); end; end.
Const N=30; Var A:array[1..N]of byte; i:byte; Begin For i:= 1 to N do Begin A[i]:=random(2); Write(A[i],' ') End; WriteLn; For i:= 1 to N do Begin if A[i]=0 then A[i]:=1 else A[i]:=0; Write(A[i],' ') End End.
A:array [1..1000] of integer;
i,n:integer;
Begin
Readln(n);
For i:=1 to n do begin
A[i]:=Random(2);
Write(A[i],' ');
end;
Writeln;
For i:=1 to n do begin
if A[i]=1 then A[i]:=0 else A[i]:=1;
Write(A[i],' ');
end;
end.
Const
N=30;
Var
A:array[1..N]of byte;
i:byte;
Begin
For i:= 1 to N do
Begin
A[i]:=random(2);
Write(A[i],' ')
End;
WriteLn;
For i:= 1 to N do
Begin
if A[i]=0 then A[i]:=1
else A[i]:=0;
Write(A[i],' ')
End
End.