' Initsializatsiya, zapros kol-va elementov
CLS: INPUT "Kol-vo elementov:", el
DIM m(el) AS INTEGER, chsum
' Zapolnim massiv
RANDOMIZE TIMER
FOR i = 1 TO el
m(i) = INT(RND * 11): PRINT m(i);
NEXT: PRINT
' Schitaem summu el-v
FOR i = 1 TO el
IF (m(i) AND 1) = 0 THEN chsum = chsum + m(i)
NEXT
' Rezultat
PRINT "Summa:"; chsum
Тестирование выполнено в программе QB64 ( Скачать )