Var s,n,i,so:integer;
Begin
Write('Nhap so luong so n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap so thu ',i)readln(so);
If so mod 2 = 0 then s:=s+so;
End;
Write('Tong cac so chan la ',s);
Readln;
End.
Program HOC24;
var i,n,t: integer;
a: array[1..32000] of integer;
begin
write('Nhap n= '); readln(n);
for i:=1 to n do if i=n then readln(a[i]) else read(a[i]);
t:=0;
for i:=1 to n do if a[i] mod 2=0 then t:=t+a[i];
write('Tong cac so chia het cho 2 la: ',t);
readln
end.