Женьку

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var
s1, s2: string;
i, j, count: byte;
p: boolean;
BEGIN
count:=0; i:=0;
write('S1: '); readln(s1);
write('S2: '); readln(s2);
while (i<=length(s1)) do
begin
p:=false; i:=i+1;
if (s1[i]=s2[1]) then
begin
p:=true;
for j:=2 to length(s2) do
begin
i:=i+1;
if (s1[i]=s2[j]) then p:=true
else p:=false;
end; if p then count:=count+1;
end;
end;
writeln(count);
END.