INPUT "vvedite chislo strok ", n
INPUT "vvedite chislo stolbcov ", m
DIM a(n, m)
RANDOMIZE TIMER
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = INT(RND * 2)
NEXT
NEXT
PRINT "massiv"
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
FOR i = 1 TO n
FOR j = 1 TO m
IF a(i, j) = 0 THEN kol0 = kol0 + 1 ELSE kol1 = kol1 + 1
NEXT
NEXT
PRINT "kolichestvo nuley="; kol0
PRINT "kolichestvo edinic="; kol1
Тестирование выполнено в программе QB64 ( Скачать )