- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
procedure TForm1.Button1Click(Sender: TObject);
var i,i2,p,g,gg3: integer;
gg:string;
gg2: Real;
begin
g:=0;
gg:=intTOstr((Length(Memo1.Lines.Text)));
gg2:=StrToFloat(gg)/4;
gg3:=Trunc(gg2);
gg:=Memo1.Lines.Text;
for i2:=1 to gg3 do begin
p:=pos('котэ',gg);
if p>0 then begin
Delete(gg,p,4);
g:=g+1;
Label1.Caption:=IntToStr(g);
end;
end;
end;