写个小算法 给你一串字符串12345678转换成 34127856 这样的就是每两个字符互换位置 脑子笨 转不过来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for step 2swap s[i] s[i+1] procedure TForm1.test(str:string);var temp:string;begin temp := ''; while Length(str) >= 4 do begin temp := temp + Copy(str,3,2); temp := temp + Copy(str,1,2); Delete(str,1,4); end; temp := temp + str; ShowMessage(temp);end;procedure TForm1.BtnClick(Sender: TObject);begin test(Txt.Text);end;第一次在网上做这类题,这是我的做法 请教Tchar 绘制曲线的问题 gdi+和D2007高手才能回答的问题! fastreport的问题 简单问题,送分啦 请问在DELPHI中如何动态创建一个表或存储过程呢 TImage 鼠标在窗体上 在Delphi中Inherited关键字有什么作用 网吧管理系统-源代码 有没有人计算过,从VB向DELPHI过度一般需要多长时间。 GDI软件包出现的问题(delphi7) 取经
swap s[i] s[i+1]
var temp:string;
begin
temp := '';
while Length(str) >= 4 do
begin
temp := temp + Copy(str,3,2);
temp := temp + Copy(str,1,2);
Delete(str,1,4);
end;
temp := temp + str;
ShowMessage(temp);
end;
procedure TForm1.BtnClick(Sender: TObject);
begin
test(Txt.Text);
end;第一次在网上做这类题,这是我的做法