Var
S:string;
k,i:integer;
Begin
k:=0;
WriteLn('Введите строку');
ReadLn(S);
For i:= 1 to Length(S) do
if S[i] = '.' then k:=k+1;
WriteLn('Количество точек в строке: ',k)
End.
Var
S,S1:string;
i:integer;
Begin
WriteLn('Введите строку');
ReadLn(S);
S1:='';
For i:= 1 to Length(S)-1 do
Begin
if S[i] <> ' ' then S1:=S1+S[i];
if (S[i] = ' ')and(S[i+1] <> ' ') then S1:=S1+S[i];
End;
S:='';
if S1[1] = ' ' then
For i:= 2 to Length(S1) do
S:=S+S1[i]
else
For i:= 1 to Length(S1) do
S:=S+S1[i];
WriteLn(S);
End.