Const m = 50;var n,s,d,i,j:integer;A, B:Array[1..m] of integer;beginwrite('Введите число элементов n');readln(n);for i:=1 to n dobeginb[i]:= i;write(b[i]:3)end;writeln;while (d < n ) dobegins:= random(n)+1;for j:=1 to n dobeginif (b[j]>0) and (s = b[j]) thenbegin d:= d +1; a[d]:= s; b[j]:= -1; end;end;end;
for i:=1 to n dowrite(A[i]:3);
end.