uses crt;
var a:array[2..250]of integer;
i,n,dem:integer;
begin
clrscr;
write('n='); readln(n);
if (2<=n) and (n<=250) then
begin
for i:=2 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
dem:=0;
for i:=2 to n do
if (a[i]>0) and (a[i] mod 2=0) then inc(dem);
writeln('so cac so duong chan trong day la: ',dem);
end
else writeln('vui long nhap lai n');
readln;
end.
program an_danh;
uses crt;
var n,i,dem:integer;
a: array [1..250] of integer;
begin
clrscr;
repeat
write('Nhap N: ');readln(n);
if (n < 2) or (n > 250) then
begin
write('Hay nhap so >= 2 hoac <= 250');
delay(2000);
clrscr;
end;
until (n >= 2) and (n <= 250);
for i:= 1 to n do
begin
write('Nhap phan tu thu ',i,': ');
readln(a[i]);
end;
dem:= 0;
for i:= 1 to n do
if a[i] mod 2 = 0 then dem:= dem + 1;
write('So cac so duong chan trong day la: ',dem);
readln
end.