Const
K = 13;
Var
A:array[1..K] of integer;
i,S:integer;
Begin
Write('Исходный массив: ');
For i:= 1 to K do
Begin
A[i]:=random(21)-10;
Write(A[i],' ');
End;
S:=0;
i:=0;
Repeat
i:=i+1;
if A[i]>0 then
Repeat
S:=S+A[i];
i:=i+1
Until i>K;
Until i>=K;
WriteLn;
WriteLn('S = ',S);
End.