program Dom;
uses crt;
var A:array[1..50] of integer;
i,dc,dl:integer;
begin clrscr;
for i:=1 to 50 do
begin
write('Nhap phan tu thu ',i,': '); readln(A[i]);
end;
for i:=1 to 50 do
begin
if A[i] mod 2=0 then inc(dc);
if A[i] mod 2<>0 then inc(dl);
end;
writeln('Co ',dc,' so chan: '),
for i:=1 to 50 do
if A[i] mod 2=0 then write(A[i]:3);
writeln('Co ',dl,' so le: '),
for i:=1 to 50 do
if A[i] mod 2<>0 then write(A[i]:3);
readln;
end.
Học tốt!