CLS
INPUT "n="; n
DIM a(n, n): DIM b(n, n): DIM c(n, n)
FOR i = 1 TO n
FOR j = 1 TO n
INPUT "Vvedite element matrici a "; a(i, j)
NEXT
NEXT
FOR i = 1 TO n
FOR j = 1 TO n
INPUT "Vvedite element matrici B "; b(i, j)
NEXT
NEXT
PRINT "Matrica a"
FOR i = 1 TO n
FOR j = 1 TO n
PRINT a(i, j);
NEXT j
PRINT
NEXT i
PRINT "Matrica b"
FOR i = 1 TO n
FOR j = 1 TO n
PRINT b(i, j);
NEXT j
PRINT
NEXT i
FOR i = 1 TO n
max = b(i, 1)
FOR j = 2 TO n
IF b(i, j) > max THEN max = b(i, j)
NEXT j
FOR k = 1 TO n
c(i, k) = a(i, k) * max
NEXT k
NEXT i
PRINT "Matrica C"
FOR i = 1 TO n
FOR j = 1 TO n
PRINT c(i, j);
NEXT j
PRINT
NEXT i
Тестирование выполнено в программе QB64 ( Скачать )