program tongchan;
uses crt;
var i,n,s:integer;
a:array[1..50] of integer;
Begin
Write('n=');readln(n);
for i:=1 to n do
Write('a[,'i',]=');readln(a[i]);
s:=0;
for i:=1 to n do
if a[i] mod 2 = 0 then s:=s+a[i];
if s=0 then write('Trong mang ko co so chan') else write('Tong cac so chan la:,s');
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,t,t1:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
t1:=0;
for i:=1 to n do
if a[i] mod 2=0 then t1:=t1+a[i];
writeln('Tong cac so la: ',t);
writeln('Tong cac so chan la: ',t1);
readln;
end.