INPUT "vvedite kolichestvo strok N ", n
INPUT "vvedite kolichestvo stolbcov M ", m
DIM a(n, m)
FOR i = 1 TO n
FOR j = 1 TO m
INPUT "vvedite element ", a(i, j)
NEXT
NEXT
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
p = 1
FOR i = 1 TO n
FOR j = 1 TO m
IF a(i, j) > 0 THEN p = p * a(i, j)
NEXT
PRINT
NEXT
PRINT "proizvedenie="; p
Тестирование выполнено в программе QB64 ( Скачать )