... |
code:
procedure ran_dom;
var
x,i,j,e:integer;
xx:array [1..100] of integer;
begin
for i:=1 to 100 do
xx[i]:=0;
for i:=1 to 100 do
begin
e:=0;
repeat
x:=random(100)+1;
if xx[x]=0 then
begin
xx[x]:=i;
e:=1;
end;
until e=1;
end;
e:=0;
x:=random(100)+1;
for i:=1 to j do
if x=xx[i] then e:=1;
end;