b = 100
c = -100
DIM A(9, 7)
RANDOMIZE TIMER
PRINT "matrica"
FOR i = 1 TO 9
FOR j = 1 TO 7
A(i, j) = c + INT(RND * (b - c + 1))
PRINT A(i, j);
NEXT j
PRINT
NEXT i
DIM N(7)
FOR j = 1 TO 7
N(j) = 0
FOR i = 1 TO 9
IF A(i, j) > 0 THEN
N(j) = N(j) + 1
END IF
NEXT i
NEXT j
FOR j = 1 TO 7
PRINT N(j)
NEXT j
max = N(1): M = 1
FOR j = 2 TO 7
IF N(j) > max THEN max = N(j): M = j
NEXT
PRINT "M="; M
Тестирование выполнено в программе QB64 ( Скачать )