Через бейсик не Паскаль
DIM n AS INTEGER, a AS INTEGER CLS INPUT "n=", n s = 0 PRINT "Вводите данные" FOR i = 1 TO n INPUT "", a IF a > 0 THEN s = s + a NEXT i PRINT "S="; s