CLS
DIM a(10)
FOR i = 1 TO 10
PRINT "vvedite element"; i
INPUT a(i)
NEXT
FOR i = 1 TO 10
IF a(i) <= 7 THEN s = s + a(i): k = k + 1 ELSE EXIT FOR
NEXT
PRINT "summa ="; s
PRINT "k ="; k
Тестирование выполнено в программе QB64 ( Скачать )
CLS
DIM a(10)
FOR i = 1 TO 10
PRINT "vvedite element"; i
INPUT a(i)
NEXT
FOR i = 1 TO 10
IF a(i) <= 7 THEN s = s + a(i): k = k + 1 ELSE EXIT FOR
NEXT
PRINT "summa ="; s
PRINT "k ="; k
Тестирование выполнено в программе QB64 ( Скачать )