Не работает с многоточием, если что. var f:text; c:char; k:integer; begin k:=0; assign(f,'input'); reset(f); while eof(f)=false do if eoln(f) then readln(f) else begin read(f,c); if (c='.') or (c='!') or (c='?') then k:=k+1; end; if not((c='.') or (c='!') or (c='?')) then k:=k+1; close(f); write(k) end.
var f:text; c:char; k:integer;
begin
k:=0;
assign(f,'input');
reset(f);
while eof(f)=false do
if eoln(f) then readln(f)
else
begin
read(f,c);
if (c='.') or (c='!') or (c='?') then k:=k+1;
end;
if not((c='.') or (c='!') or (c='?')) then k:=k+1;
close(f);
write(k)
end.