编辑代码


program CountNum(input,output);
var
    zs,fs,x,i:integer;
begin
    i:=0;
    zs:=0;
    fs:=0;
while i<20 do
 begin
    read(x);
    if x<0 then 
    fs:=fs+1;
    if x>0 then
    zs:=zs+1;
    i:=i+1;
 end;
    writeln('正数的个数:',zs);
    writeln('负数的个数:',fs);
end.