Матрицу М(12;10) заполнить нулями и единицами случайным образом. Вывести M, N, K
DIM a(12, 10)
RANDOMIZE TIMER
FOR i = 1 TO 12
FOR j = 1 TO 10
a(i, j) = INT(RND * 2)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO 12
FOR j = 1 TO 10
PRINT a(i, j); " ";
NEXT
PRINT
NEXT
PRINT
min = 13
FOR j = 1 TO 10
kol0 = 0
kol1 = 0
FOR i = 1 TO 12
IF a(i, j) = 0 THEN kol0 = kol0 + 1 ELSE kol1 = kol1 + 1
NEXT
IF kol0 > kol1 THEN n = n + 1: PRINT "v stolbce "; j; " nuley bolshe chem edinic"
IF kol0 < min THEN min = kol0: k = j
NEXT
PRINT
PRINT "vsego stolbcov, v kotoryh nulej bolshe chem edinic="; n
PRINT " minimalnoe kolichestvo nuley="; min; " v stolbce "; k