DIM a(15)
DATA 7,8,-4,3,5,-1,-2,3,-4,5,4,3,0,-5,1
FOR i = 1 TO 15
READ a(i)
NEXT
PRINT "massiv"
FOR i = 1 TO 15
PRINT a(i);
NEXT
PRINT
FOR i = 1 TO 15
IF a(i) = 3 THEN k = k + 1
NEXT
FOR i = 1 TO 15
IF a(i) = 3 THEN m = m + 1
IF m >= 1 AND m < k AND a(i) < 0 THEN s = s + a(i)
NEXT
PRINT "s="; s
Тестирование выполнено в программе QB64 ( Скачать )