var a: array [1..20] of integer;
min,max,i,n: integer;
begin
write('n = (<= 20): ');</p>
read(n);
writeln();
for i:= 1 to n do
begin
a[i]:= random(50)-25;
write(a[i]:4);
end;
min:= a[1];
max:= a[1];
for i:= 1 to n do
begin
if min < a[i] then
begin
min:= a[i];
end;
end;
for i:= 1 to n do
begin
if max > a[i] then
begin
max:= a[i];
end;
end;
writeln();
writeln('min = ',min);
writeln('max = ',max);
end.