n = 5
DIM a(n)
FOR i = 1 TO 5
INPUT "vvedite element ", a(i)
NEXT
s = 0
k = 0
FOR i = 1 TO n
IF a(i) < 0 THEN s = s + a(i): k = k + 1
NEXT
PRINT "srednee="; s / k
Тестирование выполнено в программе QB64 ( Скачать )
n = 5
DIM a(n)
FOR i = 1 TO 5
INPUT "vvedite element ", a(i)
NEXT
s = 0
k = 0
FOR i = 1 TO n
IF a(i) < 0 THEN s = s + a(i): k = k + 1
NEXT
PRINT "srednee="; s / k
Тестирование выполнено в программе QB64 ( Скачать )