DO
INPUT "vvedite razmer massiva t ", t
IF t < 20 THEN PRINT "malo elementov"
LOOP UNTIL t >= 20
DIM f(t)
INPUT " vvedite chislo m ", m
DATA 3,-8,5,7,-6,9,-4
FOR i = 1 TO 7
READ f(i)
s = s + f(i)
NEXT
k = (t - 7) \ 2
RANDOMIZE TIMER
FOR i = 8 TO 8 + k
IF i MOD 2 = 0 THEN f(i) = 100 ELSE f(i) = INT(RND * 10) * m
IF f(i) MOD 2 = 0 THEN sc = sc + f(i): kol = kol + 1
NEXT
FOR i = k + 9 TO t
f(i) = i + i - 1
NEXT
PRINT "massiv"
FOR i = 1 TO t
PRINT f(i);
NEXT
PRINT
PRINT "srednee 1 chasti="; s / 7
PRINT "summa chetnyh 2 chsti="; sc; " ih kolichestvo="; kol
k = (t - 7) \ 2
IF f(i) MOD 2 = 0 THEN sc = sc + f(i): kol = kol + 1
Тестирование выполнено в программе QB64 ( Скачать )