1)
program gt;
var a,b:array[1..100]of integer;
n,m,i,q:longint;
begin
Randomize;
q:=0;
for i:=1 to 10 do
begin
a[i]:=random(200)-100;
if(a[i]>0)then begin
q:=q+1;
if(q=1)then a[i]:=400;
end;
end;
for i:=1 to 10 do
begin
if(a[i]<>400)then write(a[i],' ');
end;
end.
2)
program gt;
var a,b:array[1..100]of integer;
n,m,i,q:longint;
begin
Randomize;
for i:=1 to 10 do
begin
a[i]:=random(200)-100;
if(a[i]<0)then begin<br>a[i]:=400;
end;
end;
for i:=1 to 10 do
begin
if(a[i]<>400)then write(a[i],' ');
end;
end.