SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Find min/max value of array

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]<M then M:=Arr[i];
  Result:=M;
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes