Program Hotboy;
Uses crt;
Var A:array[1..100] of integer;
D1: integer;
sn : longint;
Begin
Clrscr;
s:=0;
Write('nhap so n');
For i:=1 to n do
Write('A[',i,']');
Readln(A[i]);
For i:=1 to n do
If ( A[i] mod 2=0) then inc(D1);
S:=S+A[i];
Write('Trung binh cac so chan la',S/D1);
Readln
End.
Bài $2$
Program Hotboy;
Uses crt;
Var A:array[1..100] of integer;
D,x:integer;
sn : longint;
Begin
Clrscr;
s:=0;
D:=0;
Write('nhap so n');
For i:=1 to n do
Write('A[',i,']');
Readln(A[i]);
Write('nhap x');
Readln(x);
For i:=1 to n do
If A[i] <= x then inc(d);
Write('so so thoa man la',D);
Readln
End.