var
slovo,simval:string;
i,k:integer;
begin
k:=0;
write('vvedite slovo ');
readln(slovo);
write('vvedite simval ');
readln(simval);
for i:=1 to length(slovo) do
begin
if slovo[i]=simval then k:=k+1;
if slovo[i]=simval then writeln(i,' ');
end;
if k>=1 then
writeln('YES vstre4aets9 ',k,' raz, na pozicii ',i)else writeln('NO');
writeln;
end.
вот в одном решении