Co jest złego w tym programie?
program zliczanie_wystapien;
var posz,dlug,liczby,i,wystapien,k,t:integer;
begin
readln(t);
k:=1;
while k<=t do begin
read(posz);
read(dlug);
i:=1;
while i<=dlug do begin
if i<dlug then read(liczby) else readln(liczby);
if liczby=posz then wystapien:=wystapien+1;
i:=i+1;
end;
writeln(wystapien);
wystapien:=0;
k:=k+1;
end;
readln;
end.
Wszystko co miałem zrobić, zrobiłem.