CLS
DIM a(18)
FOR i = 1 TO 18
PRINT "vvedite element"; i
INPUT a(i)
NEXT
FOR i = 1 TO 18
IF a(i) = 3 AND i MOD 2 = 0 THEN k = k + 1
NEXT
CLS
PRINT "massiv:"
FOR i = 1 TO 18
PRINT a(i);
NEXT
PRINT
PRINT "chetnyh elementov = "; k
Тестирование выполнено в программе QB64 ( Скачать )