DIM r(3, 2)
FOR i = 1 TO 3
FOR j = 1 TO 2
INPUT "vvedite element ", r(i, j)
NEXT
NEXT
PRINT "matrica"
FOR i = 1 TO 3
FOR j = 1 TO 2
PRINT r(i, j); " ";
NEXT
PRINT
NEXT
max = r(1, 1)
FOR i = 1 TO 3
IF r(i, 1) > max THEN max = r(i, 1)
NEXT
IF (r(3, 1) > 0) AND (r(3, 2) > 0) THEN FOR k = 1 TO 3: r(k, 2) = 20: NEXT: FOR j = 1 TO 2: r(2, j) = max: NEXT
PRINT "novaya matrica"
FOR i = 1 TO 3
FOR j = 1 TO 2
PRINT r(i, j); " ";
NEXT
PRINT
NEXT
Результат работы программы
Тестирование выполнено в программе QB64 ( Скачать )