1)
program gt;
var a,b:array[1..100]of integer;
n,m,i:longint;
begin
Randomize;
a[5]:=-20;
for i:=1 to 8 do
begin
if(i<5)then a[i]:=random(101)+100;<br>if(i>4)then a[i+1]:=random(101)+100;
end;
for i:=1 to 9 do
begin
write(a[i],' ');
end;
end.
2)
program gt;
var a,b:array[1..100]of integer;
n,m,i,max:longint;
begin
Randomize;
max:=-20;
for i:=1 to 8 do
begin
a[i]:=random(101)+100;
if(a[i]>max)then max:=a[i];
end;
for i:=1 to 8 do
begin
if(a[i]<>max)then write(a[i],' ');
if(a[i]=max)then write(0,' ',a[i],' ');
end;
end.