uses
crt;
const
dividers=[' ',',','.',';',':','-','=','+'];{дописать нужные}
var
s,temp:string;
i,j,c:integer;
ch:char;
begin
clrscr;
writeln('Введите букву...');
readln(ch);
writeln('Введите строку...');
readln(s);
temp:='';
c:=0;
{пробегаем всю строку посимвольно}
writeln('Найденные слова:');
for i:=1 to length(s) do
begin
if not (s[i] in dividers) then
temp:=temp+s[i];
if (s[i] in dividers) or (i=length(s)) then
begin
if temp<>'' then
begin
if pos(ch,temp)<>0 then
begin
inc(c);
write(temp,' ')
end;
temp:='';
end;
end;
end;
writeln;
writeln('Всего таких слов: ',c);
readln
end.