program PrintEvenOdd;
var
num, even, odd, i: Integer;
begin
even := 0;
odd := 0;
for i := 1 to 5 do
begin
writeln('Nhap so thu ', i, ': ');
readln(num);
if num mod 2 = 0 then
even := even + 1
else
odd := odd + 1;
end;
writeln('Tong chan: ', even);
writeln('Tong le: ', odd);
end.
Var a:array[1..5] of integer;
i:integer;
Begin
For i:=1 to 5 do
Begin
Write('Nhap so thu ',i,' = ');readln(a[i]);
End;
Writeln('Cac so chan la ');
For i:=1 to 5 do
If a[i] mod 2 = 0 then write(a[i]:8);
Writeln;
Write('Cac so le la ');
For i:=1 to 5 do
If a[i] mod 2 <> 0 then write(a[i]:8);
Readln
End.