INPUT "vvedite razmer matricy ", n
DIM a(n, n)
RANDOMIZE TIMER
PRINT "ishodnyj massiv"
FOR i = 1 TO n
FOR j = 1 TO n
a(i, j) = INT(RND * 10)
PRINT a(i, j);
NEXT
PRINT
NEXT
max = a(1, n)
FOR i = 1 TO n
IF d(i, n - i + 1) > max THEN max = d(i, i)
NEXT
PRINT "max="; max
Тестирование выполнено в программе QB64 ( Скачать )