Articles

Use Find_Max and Find_Min procedures, if you want to get maximum or minimum value from array, which contains 10 numbers.

function Find_Max(Arr: array of Integer): Integer;
var
  i, M: Integer;
begin
  M:=Arr[Low(Arr)];
  for i:=1 to High(Arr) do
    if Arr[i]>M then M:=Arr[i];
  Result:=M;
end;

function Find_Min(Arr: array of Integer): Integer;
var
  i, M: Integer;
begin
  M:=Arr[Low(Arr)];
  for i:=1 to High(Arr) do
    if Arr[i]