INPUT "vvedite razmer massiva ", n
DIM d(n)
FOR i = 1 TO n
INPUT "vvedite element ", d(i)
NEXT
PRINT "massiv"
FOR i = 1 TO n
PRINT d(i);
NEXT
PRINT
FOR i = 1 TO n
IF d(i) > 0 THEN kp = kp + 1: sp = sp + d(i)
IF d(i) < 0 THEN ko = ko + 1: so = so + d(i)
NEXT
PRINT "popojitelnyh"; kp
PRINT "otricatelnyh"; ko
PRINT "summa polojitelnih="; sp
PRINT "summa otricatelnyh="; so
IF kp > ko THEN PRINT "polojitelnyh bolche" ELSE IF ko > kp THEN PRINT "otricatelnyh bolshe" ELSE PRINT "odinakovo"
Тестирование выполнено в программе QB64 ( Скачать )