INPUT "vvedite kolichestvo strok N ", n
INPUT "vvedite kolichestvo stolbcov M ", m
RANDOMIZE TIMER
DIM a(n, m)
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = INT(RND * 20)
NEXT
NEXT
PRINT "matrica "
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
max = a(1, 1)
FOR i = 1 TO n
FOR j = 1 TO m
IF a(i, j) > max THEN max = a(i, j)
NEXT
NEXT
PRINT "novaya matrica "
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = a(i, j) * max
PRINT a(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )