Uses crt;
Const N = 15;
var ms : array [1..N] of integer;
i : integer;
pos,neg,nul : integer;
begin
pos:=0; neg:=0; nul:=0;
randomize;
for i:=1 to N do
begin ms[i]:=random(15)-7; write (ms[i]:3);
if ms[i] > 0 then inc (pos) else
if ms[i] < 0 then inc (neg) else inc(nul);
end;
writeln;
writeln ('pos ',pos);
writeln ('neg ', neg);
writeln ('nil ',nul);
readkey;
end.
const n=14;
var
a:Array [0..n] of integer;
i,s1,s2,s3,count1,count2,count3:Integer;
begin
for i:=0 to n do
readln(a[i]);
s1:=0; s2:=0; s3:=0;
count1:=0;count2:=0;count3:=0;
for i:=0 to n do
begin
if a[i]>0 then begin
s1:=s1+a[i];
inc(count1);
end;
if a[i]<0 then begin
s2:=s2+a[i];
inc(count2);
end;
if a[i]=0 then begin
s3:=s3+a[i];
inc(count3);
end;
end;
writeln('>0: ',s1,' * ',count1);
writeln('<0: ',s2,' * ',count2);
writeln('=0: ',s3,' * ',count3);
readln;
end.