呵呵,很简单,就是将原来的大家习惯的“整”换成“零角零分”,可以实现,不知道满足要求不?如下代码:<br>Function NtoC(n0 :real) :String;<br> Function IIF(b :boolean; s1,s2:string):string;<br> begin <br> if b then IIF:=s1 else IIF:=s2;<br> end;<br> Const c = '零壹贰叁肆伍陆柒捌玖◇分角圆拾佰仟万拾佰仟亿拾佰仟万';<br> var L,i,n, code :integer;<br> Z :boolean;<br> s, st,st1 :string;<br>begin<br> s :=FormatFloat( '0.00', n0);<br> L :=Length(s);<br> Z :=n0<1;<br> For i:= 1 To L-3 do<br> begin<br> Val(Copy(s, L-i-2, 1), n, code);<br> st:=IIf((n=0)And(Z Or (i=9)Or(i=5)Or(i=1)), '', Copy(c, n*2+1, 2))<br> + IIf((n=0)And((i<>9)And(i<>5)And(i<>1)Or Z And(i=1)),'',Copy(c,(i+13)*2-1,2))<br> + st;<br> Z := (n=0);<br> end;<br> Z := False;<br> For i:= 1 To 2 do<br> begin<br> Val(Copy(s, L-i+1, 1), n, code);<br> st1:= IIf((n=0)And((i=1)Or(i=2)And(Z Or (n0<1))), '', Copy(c, n*2+1, 2))<br> + IIf((n>0), Copy(c,(i+11)*2-1, 2), IIf((i=2) Or Z, '','零角零分'))<br> + st1;<br> Z := (n=0);<br> end;<br> For i := 1 To Length(st) do If Copy(st, i, 4) = '亿万' Then Delete(st,i+2,2);<br> NtoC := IIf( n0=0, '零', st + st1);<br>End;<br><br>调用:Edit2.Text:=NtoC(StrToFloat(Edit1.Text));