DIM M(1 TO 4, 1 TO 4), MAXEL
' Zapolnim matritsu sluchainimi znacheniyami
RANDOMIZE TIMER
FOR y = 1 TO 4: FOR x = 1 TO 4
M(x, y) = (RND * 100) - 50
NEXT: NEXT
' Ishchem maksimalnii element v 3-i stroke
MAXEL = M(1, 3)
FOR x = 1 TO 4
IF M(x, 3) > MAXEL THEN MAXEL = M(x, 3)
NEXT
PRINT "Maksimalnyj element:"; MAXEL
Тестирование выполнено в программе QB64 ( Скачать )