function array_compare arr1 arr2 array of integer integer array of int

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
function array_compare(arr1, arr2: array[,] of integer; n, m: integer): array [,] of integer;
begin
var arr: array [,] of integer;
var i, j, k:integer;
arr := new integer[n, m];
for i := 0 to n - 1 do begin
for j := 0 to m - 1 do begin
arr[i, j] := 0;
for k := 1 to n - 1 do begin
arr[i, j] := arr[i, j] + arr1[i, k] * arr2[k, j];
end;
end;
end;
array_compare := arr;
end;