randomize;
repeat
for i:=1 to n do
a[i]:=random(100)-50;
f:=false;
for i:=1 to n-1 do
begin
if a[i]>a[i+1] then
begin
f:=true;
c=a[i];a[i]=a[i+1]:=c;
end;
end;
until not f;
for i:=1 to b do begin
if a[i]<0 then write(a[i],' ');
end;
Помогите
randomize;
repeat
for i:=1 to n do
a[i]:=random(100)-50;
f:=false;
for i:=1 to n-1 do
begin
if a[i]>a[i+1] then
begin
f:=true;
c=a[i];a[i]=a[i+1]:=c;
end;
end;
until not f;
for i:=1 to b do begin
if a[i]<0 then write(a[i],' ');
end;
repeat
for i:=1 to n do
a[i]:=random(100)-50;
for i:=1 to n do
a[i]:=random(100)-50;
repeat