Again: CLS
INPUT "Vvedite kol-vo elementov: ", n
IF n < 3 GOTO Again
DIM A%(n)
PRINT "Vvedite poocheredno elementi:"
FOR i = 1 TO n
PRINT "Element ь" + STR$(i) + ": "; : INPUT "", A%(i)
NEXT
PRINT STRING$(50, 196)
min = A%(1): max = min
FOR i = 1 TO n
IF A%(i) > max THEN max = A%(i)
IF A%(i) < min THEN min = A%(i)
S = S + A%(i)
NEXT
PRINT "Sredn arifm: "; (S - max - min) / (n - 2)
Тестирование выполнено в программе QB64 ( Скачать )