CLS
RANDOMIZE TIMER
INPUT "vvedite n"; n
DIM a(n)
FOR i = 1 TO n
a(i) = FIX(RND * 11 + 10)
NEXT
FOR i = 2 TO n STEP 2
k = k + 1
sr = sr + a(i)
NEXT
sr = sr / k
FOR i = 1 TO n
PRINT a(i);
NEXT
PRINT
PRINT "sr:"; sr
Тестирование выполнено в программе QB64 ( Скачать )