输入n(1
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/07 18:12:07
输入n(1输入n(1输入n(1varn,x,i,s1,s2:longint;begins1:=0;s2:=0;fori:=1tondobeginread(x);ifodd(x)theninc(s1,x
输入n(1
输入n(1
输入n(1
var n,x,i,s1,s2:longint;
begin
s1:=0; s2:=0;
for i:=1 to n do
begin
read(x);
if odd(x) then inc(s1,x) else inc(s2,x);
end;
writeln('Ji Shu He=',s1);
writeln('Ou Shu He=',s2);
end.