Uses Crt;
Const
N = 13;
Var
A:array[1..N] of integer;
i,k:integer;
S:real;
Begin
Randomize;
ClrScr;
For i:= 1 to N do
Begin
A[i]:=random(21)-10;
Write(A[i],' ')
End;
WriteLn;
i:=1;
k:=0;
While (A[i]>=0)and(i Begin
k:=k+1;
i:=i+1
End;
if A[i]>=0 then k:=k+1;
WriteLn('k = ',k);
S:=0;
For i:= i+1 to N do
S:=S+A[i];
WriteLn('S = ',S:0:3);
ReadLn
End.