uses crt;
var i,n,s,a,v,t:longint;
begin
clrscr;
write('So lan nhap so vao:'); readln(n);
for i:=1 to n do
begin
s:=s+1;
write('Nhap so thu',s,':'); readln(a);
if(a mod 2=0) then
t:=t+a;
if (a mod 2 <> 0) then
v:=v+a;
end;
writeln('Tong cac so le la:',v);
writeln('Tong cac so chan la:',t);
readln
end.
Tham khảo nha!