Program fofgogjoj;
var
arr: array[1..1000] of byte;
max_num, min_num: byte;
i: byte;
n,p:integer;
begin
randomize;
Wriiteln('Введите число n');
Readln(n);
for i := 1 to n do begin
arr[i] := random(100);
Write (arr[i]:3);
end;
max_num := arr[1];
for i := 2 to n do
if arr[i] > max_num then
begin
max_num := arr[i];
end;
Writeln;
Writeln ('Max = ',max_num);
min_num := arr[1];
for i := 2 to n do
if arr[i] < min_num then
begin
min_num := arr[i];
end;
Writeln;
Writeln ('Min = ',min_num);
P:=max_num*min_num;
Writeln('Произведение равно:',p);
end.