Lời giải :
program hotrotinhoc ;
var a : array[1..32000] of integer ;
n,i,dem : integer ;
begin
write('n='); readln(n);
write('Nhap cac gia tri cho phan tu');
for i:= 1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
dem:=0;
for i:= 1 to n do
if n=a[i] then
begin
write('n xuat hien') else write('n khong xuat hien');
dem:=dem+1;
end;
write('n xuat hien so lan la:',dem);
readln
end.