sub main
dim X(0 to 5, 0 to 5)
'заполняем
summX = Summ(X)
multiplX = Multip(X)
dim Y(1 to 3, 1 to 3)
'заполняем
multiplY = Multip(Y)
summY = Summ(Y)
end sub
function Summ(byval arr)
b1=LBound(arr)
b2=UBound(arr)
Summ=0
For i=b1 to b2
Summ = Summ + arr(i, b2-i+b1)
next i
end function
function Multip(byval arr)
b1=LBound(arr)
b2=UBound(arr)
Multip=1
For i=b1 to b2
Multip = Multip * arr(i, b2-i+b1)
next i
end function