// PascalABC.NET 3.0, сборка 1150 от 22.01.2016
begin
for var i:=1 to 2 do begin
var a:=ArrRandom(ReadInteger('n='),1,50).Println(', ');
WritelnFormat('min={0}, max={1}',a.Min,a.Max)
end
end.
Тестовое решение:
n= 13
39, 10, 24, 1, 41, 21, 5, 21, 10, 24, 7, 2, 7
min=1, max=41
n= 10
13, 23, 31, 23, 30, 44, 10, 34, 34, 18
min=10, max=44