uses crt;
var a:array[1..249]of integer;
i,n,t,dem:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until (0<n) and (n<250);
for i:=1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
writeln('Day so ban vua nhap la: ');
for i:=1 to n do
write(a[i]:4);
writeln;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln('Tong cac phan tu trong day la: ',t);
dem:=0;
writeln('Cac so chan trong day la: ');
for i:=1 to n do
if a[i] mod 2=0 then
begin
write(a[i]:4);
inc(dem);
end;
writeln;
writeln('So phan tu chan la: ',dem);
readln;
end.