M mawei0913_green Unregistered / Unconfirmed GUEST, unregistred user! 2007-06-05 #1 有个字符串:s='3168954621' 我想实现奇偶位字符的位置交换,得到s='1386596412' 请各位高人,指教,谢谢!
Z ztf86781163 Unregistered / Unconfirmed GUEST, unregistred user! 2007-06-05 #2 function Chang( Str : string): string ; var tmp : string ; i : Integer ; begin SetLength(tmp ,Length( Str )) ; for i := 1 to Length( Str ) do if i mod 2 =1 then tmp :=Str [ i+1] else tmp :=Str [ i - 1] ; result := tmp ; end;
function Chang( Str : string): string ; var tmp : string ; i : Integer ; begin SetLength(tmp ,Length( Str )) ; for i := 1 to Length( Str ) do if i mod 2 =1 then tmp :=Str [ i+1] else tmp :=Str [ i - 1] ; result := tmp ; end;
M mawei0913_green Unregistered / Unconfirmed GUEST, unregistred user! 2007-06-05 #3 各位高人,怎么没人回答呀?望高人能给予帮助,谢谢!
M mawei0913_green Unregistered / Unconfirmed GUEST, unregistred user! 2007-06-05 #5 有好的咱们加分可以商量呀?请高人指教 在此谢谢 TO:ztf86781163你的函数是对的