Program BTMang1C;
Uses crt;
Const Max = 100;
Type Arr100=array[1..Max] of integer; {Khai báo mảng Arr100, có tối đa 100 phần tử}
Var N:integer;
A:Arr100;
{//Thu tuc nhap mang 1c}
Procedure NhapMang1C(Var A:Arr100;Var N:integer);
Var i:integer;
Begin
Write('Nhap chieu dai cua mang: ');
Readln(N);
For i:=1 to N do
Begin
Write('Nhap gt phan tu thu a[',i,']=');
Readln(A[i]);
End;
End;
{//Thu tuc xuat mang 1C}
Procedure XuatMang1C(Var A:Arr100; Var N:integer);
Var i:integer;
Begin
For i:= 1 to N do
Write(A[i]:5);
Writeln;
End;
{//Thu tuc tim so chan}
Procedure SoChan(A:Arr100;N:integer);
Var i: integer;
Begin
For i:= 1 to N do
begin
If(A[i] mod 2 = 0) then
Write(A[i]:5);
end;
End;
{//Thu tuc tim so le}
Procedure SoLe(A:Arr100;N:integer);
Var i:integer;
Begin
For i:=1 to N do
begin
If(A[i] mod 2 = 1) then
Write(A[i]:5);
end;
End;
{//Thu tuc in ra so nho <=10}
Procedure NhoHon10(A:Arr100;N:integer);
Var i:integer;
Begin
For i:=1 to N do
begin
If (1 <= A[i]) and (A[i] <= 10) then
Write(A[i]:5);
end;
End;
{//Phan than chuong trinh}
Begin
Clrscr;
NhapMang1C(A,N);
XuatMang1C(A,N);
Write('Danh sach so Chan: ');
SoChan(A,N);
Writeln;
Write('Danh sach so Le: ');
SoLe(A,N);
Writeln;
Write('Danh sach cac so tu 1 -> 10: ');
NhoHon10(A,N);
Readln;
End.