试试我的程序!!!!!!!! procedure TForm1.Button1Click(Sender: TObject); var test:string; i,num:integer; begin test:='1深1刻酱豆腐234'; num:=0; showmessage(inttostr(length(test))); for i:=1 to length(test) do begin if charlength(test,i) =2 then inc(num); end; num:=length(test)-round(num/2); showmessage(inttostr(num)); end; 有问题发消息给我1!!
procedure TForm1.Button1Click(Sender: TObject);
var
test:string;
i,num:integer;
begin
test:='1深1刻酱豆腐234';
num:=0;
showmessage(inttostr(length(test)));
for i:=1 to length(test) do
begin
if charlength(test,i) =2 then
inc(num);
end;
num:=length(test)-round(num/2);
showmessage(inttostr(num));
end;
有问题发消息给我1!!
有问题请发信息到我的E-mail:[email protected]
来信请把问题的网址粘贴上。