INPUT "vvedite kolichestvo elementov N ", n
PRINT "vvedite granicy diapazona"
INPUT "a=", a
INPUT "b=", b
IF a > b THEN SWAP a, b
DIM c(n)
FOR i = 1 TO n
INPUT "vvedite element massiva", c(i)
NEXT
PRINT "massiv"
FOR i = 1 TO n
PRINT c(i);
NEXT
PRINT
FOR i = 1 TO n
IF c(i) < a OR c(i) > b THEN s = s + c(i): k = k + 1
NEXT
PRINT "srednee arifmet.="; s / k
Тестирование выполнено в программе QB64 ( Скачать )