Ответ:
7) cadabra
9)function max (x,y: longint): longint;
begin
if x>y then max:=x else max:=y;
end;
var k: longint; s: string;
readln(s);
while (pos('.',s)<>0)or(pos('!',s)<>0)or(pos('?',s)<>0) do
k:=k+1;
Delete(s,max(max(pos('.',s),pos('!',s)),pos('?',s)),1);
writeln(k);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
7) cadabra
9)function max (x,y: longint): longint;
begin
if x>y then max:=x else max:=y;
end;
var k: longint; s: string;
begin
readln(s);
while (pos('.',s)<>0)or(pos('!',s)<>0)or(pos('?',s)<>0) do
begin
k:=k+1;
Delete(s,max(max(pos('.',s),pos('!',s)),pos('?',s)),1);
end;
writeln(k);
end.