CLS
N = 20
S1 = 0
S2 = 0
DIM F(N)
PRINT "VVEDITE ZNACHENIYA ELEMENTOV MASSIVA: "
FOR I = 1 TO N
PRINT "A("; I; ") = ";
INPUT "", A(I)
NEXT I
CLS
PRINT "ISHODN. MASSIV: "
FOR I = 1 TO N
PRINT A(I);
NEXT I
PRINT
FOR I = 1 TO N
IF A(I) >= 0 THEN S1 = S1 + A(I) ELSE S2 = S2 + A(I)
NEXT I
IF S1 > ABS(S2) THEN
PRINT "RESULTAT: "
FOR I = 1 TO N
IF A(I) > 0 THEN A(I) = 0
PRINT A(I);
NEXT I
END IF
Тестирование выполнено в программе QB64 ( Скачать )