1)
var
a:array [1..10] of integer;
i,k,m:integer;
begin
for i:= 1 to 10 do
a[i]:= Random(-100,100);
writeln(a);
m:=a[1];
for i:=2 to 10 do
if a[i]>m then m:=a[i];
writeln(m);
end.
2)
var
a:array [1..10] of integer;
i,k,m:integer;
begin
for i:= 1 to 10 do
a[i]:= Random(-100,100);
writeln(a);
for i:=1 to 10 do
if a[i]<0 then m:=a[i];<br>for i:=1 to 10 do
if (a[i]<0) and (a[i]>m) then m:=a[i];
writeln(m);
end.