CLS
INPUT "kolvo strok="; n
INPUT "kolvo stolbcov="; m
DIM a(n, m)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = INT(RND * 50) - 25
NEXT j
NEXT i
PRINT "Matrica A"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT j
PRINT
NEXT i
PRINT
s = 0
FOR j = 1 TO m
k = 0
FOR i = 1 TO n
IF a(i, j) = 0 THEN k = k + 1
NEXT i
IF k > 0 THEN s = s + 1
NEXT j
PRINT "Kolvo stolbcov gde est 0="; s
DIM max(n)
FOR i = 1 TO n
max(i) = a(i, 1)
FOR j = 2 TO m
IF a(i, j) > max(i) THEN max(i) = a(i, j)
NEXT j
NEXT i
PRINT "Massiv maksimalnih elementov kazhdoy stroki"
FOR i = 1 TO n
PRINT max(i);
NEXT i
Тестирование выполнено в программе QB64 ( Скачать )