INPUT "razmernost ", n
DIM a(n)
FOR i = 1 TO n
INPUT "element ", a(i)
NEXT
FOR i = 1 TO n
IF a(i) > 0 AND INT(a(i)) = a(i) THEN s = s + a(i)
NEXT
IF s > 999 AND s < 10000 THEN PRINT "yes" ELSE PRINT "no"
Тестирование выполнено в программе QB64 ( Скачать )