Program bai1;
uses crt;
var i,n,s,s1: integer;
a:array[1..100] of integer;
begin
clrscr;
write('nhap n =');readln(n);
for i:=1 to n do
begin
write('nhap a[',i,'] ='); readln(a[i]);
end;
for i:= 1 to n do
if a[i] mod 2 = 0 then s:=s+a[i];
writeln('tong cac so duong = ' ,s);
for i:= 1 to n do
if a[i] mod 2 <> 0 then s1:=s1+a[i];
writeln('tong cac so le =' ,s1);
readln;
end.