DIM b(6, 8)
RANDOMIZE TIMER
FOR i = 1 TO 6
FOR j = 1 TO 8
b(i, j) = INT(RND * 10) - 4
NEXT
NEXT
PRINT "ishodnaya matrica"
FOR i = 1 TO 6
FOR j = 1 TO 8
PRINT b(i, j); " ";
NEXT
PRINT
NEXT
PRINT "otricatelnye sredi chetnyh"
FOR i = 1 TO 6
PRINT "stroka "; i; " otricatelnye and chetnye:=";
FOR j = 1 TO 8
IF (b(i, j) MOD 2 = 0) AND (b(i, j) < 0) THEN PRINT b(i, j); " ";
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )