CLS
INPUT "vvedite razmer massiva"; n
DIM a(n)
FOR i = 1 TO n
PRINT "vvedite element"; i
INPUT a(i)
NEXT
FOR i = 1 TO n
s = s + a(i)
NEXT
sr = s / n
m = sr
FOR i = 1 TO n
d = a(i) - sr
IF d < 0 THEN d = d * (-1)
IF d < m THEN m = d: k = i
NEXT
CLS
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
PRINT "sr="; sr
PRINT "bl="; a(k)
Тестирование выполнено в программе QB64 ( Скачать )