DIM a(15)
RANDOMIZE TIMER
FOR i = 1 TO 15
a(i) = INT(RND(21)) - 10
NEXT
PRINT "massiv"
FOR i = 1 TO 15
PRINT a(i);
NEXT
PRINT
p = 1
FOR i = 1 TO 15
IF a(i) < 0 THEN p = p * a(i)
IF a(i) MOD 2 = 0 THEN k = k + 1 ELSE k = k - 1
NEXT
PRINT "proizvedenie otricatelnyh="; p
PRINT "raznost="; ABS(k)
Тестирование выполнено в программе QB64 ( Скачать )