program raf105;
var
s: string;
i,j,counter: integer;
begin
write('Введите строку: ');
readln(s);
for i:=1 to length(s) do
if (s[i] = 'a') and
(s[i+1] = 'b') and
(s[i+2] = 'c')
then counter:= counter + 1;
writeln('Количество "abc" в строке: ',counter);
end.
program raf105;
var
s: string;
i,j,counter: integer;
begin
write('Введите строку: ');
readln(s);
for i:=1 to length(s) do
if (s[i] = 'a') and
(s[i+1] = 'b') and
(s[i+2] = 'c')
then counter:= counter + 1;
writeln('Количество "abc" в строке: ',counter);
end.
PascalABC 3.4.2