主题:我是新手,请教个问题!!!
var
a:array [1..20] of integer;
i,x,y,z:integer;
begin
x:=0;y:=0;z:=0;
for i:=1 to 20 do
begin
read(a[i]);
case a[i] of
a[i]>0:x:=x+1;
a[i]=0:y:=y+1;
a[i]<0:z:=z+1;
end;
end;
writeln('zheng shu=',x,',ling=',y,',fu shu=',z);
readln
end.
哪错了?
怎么错的?
a:array [1..20] of integer;
i,x,y,z:integer;
begin
x:=0;y:=0;z:=0;
for i:=1 to 20 do
begin
read(a[i]);
case a[i] of
a[i]>0:x:=x+1;
a[i]=0:y:=y+1;
a[i]<0:z:=z+1;
end;
end;
writeln('zheng shu=',x,',ling=',y,',fu shu=',z);
readln
end.
哪错了?
怎么错的?