Program slovo; const symbols = [ ' ', ';', ':', '-','?','!','.',',']; var s:string; i:byte; n:integer; begin writeln('введите строку'); readln(s); for i:=1 to length(s) do begin if (s[i] in Symbols) and not (s[i-1] in Symbols) then n:=n+1; end; writeln('в строке ',n,' слов'); readln; end.