пример:
1 2 3
A=
3 2 1
4 5 6
9 8 7
B=
6 5 4
1 2 2
Amax=A(1,1)
FOR i=1 TO 3
FOR j=1 TO 3
IF Amax < A(i,j) THEN Amax=A(i,j)
NEXT j
NEXT i
DIM C(1 TO 3, 1 TO 3)
FOR i=1 TO 3
FOR j=1 TO 3
C(i,j)=A(i,j) * B(i,j) / Amax
NEXT j
NEXT i
summ=0
FOR i=1 TO 3
FOR j=1 TO 3
summ=summ + C(i,j)
NEXT j
NEXT i
PRINT summ