CLS
INPUT "Razmernost matrici="; n
DIM a(n, n)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO n
a(i, j) = INT(RND * 100) - 50
NEXT j
NEXT i
PRINT "Matrica A"
FOR i = 1 TO n
FOR j = 1 TO n
PRINT a(i, j);
NEXT j
PRINT
NEXT i
PRINT
p = 1
FOR i = 1 TO n
FOR j = 1 TO n
IF (i = n - j) OR (j = n + 2 - i) THEN p = p * a(i, j)
NEXT j
NEXT i
PRINT "Proizv="; p
Тестирование выполнено в программе QB64 ( Скачать )