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