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