# pb中将金额转化为人民币大写

string cn_n[10] = {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"} //   大写0-9
string cn_c[18] = {"分","角","元","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟","万","拾","佰","仟"}
string ls_number,ls_rc
integer li_pos,li_for,li_len
If number < 0 Then ls_rc = "负"
ls_number = string(ABS(Number) * 100,"0")
li_len = Len(ls_number)
If li_len > UpperBound(cn_c) Then Return ''
For li_for = 1 To li_len
li_pos = Integer(Mid(ls_number,li_for,1))
If li_pos <> 0 Then      ////   非零值的处理，很简单
ls_rc += cn_n[li_pos + 1] + cn_c[li_len - li_for + 1]
ElseIf Mod(li_len - li_for - 2,4) = 0 Then   ///元、万、亿、万亿进位
If Right(ls_rc,2) = cn_n[1] Then ls_rc = Left(ls_rc,Len(ls_rc) - 2)
If li_len - li_for <> 6 Or Right(ls_rc,2) <> "亿" Then ls_rc += cn_c[li_len - li_for + 1]
ls_rc += cn_n[1]
ElseIf Right(ls_rc,2) <> cn_n[1] Then
ls_rc += cn_n[1]
End If
Next
If Right(ls_rc,2) = cn_n[1] Then ls_rc = Left(ls_rc,Len(ls_rc) - 2)
If Right(ls_rc,2) = "元" Then ls_rc += "整"
Return ls_rc

07-08 2753

04-12 2267

05-13 258

03-06 456

10-17 64

03-29 3308

01-25 9万+

05-09 64

11-18 319

02-09 3738

06-28 3282

02-03 656

10-28 33

09-20 34

12-07 50

03-17 1047

05-05 5万+

04-14 59万+

03-13 15万+

03-04 13万+

03-08 2万+

04-25 6万+

03-10 13万+

03-10 18万+

03-12 11万+

03-13 11万+

03-18 9755

03-19 8万+

03-19 3万+

03-22 4万+

03-23 4万+

03-24 3万+

03-25 3万+

05-08 5万+

03-25 9万+

03-29 21万+

03-29 10万+

03-30 16万+

05-28 6084

05-28 1万+

04-02 1万+

04-02 5070

04-02 4万+

04-06 9734

04-06 7万+

04-09 8万+

04-09 2万+

05-17 8431

04-11 3万+

04-15 6万+

04-18 4万+

04-20 4万+

04-24 3万+

05-01 6387

05-03 1万+

05-16 5万+

05-06 1万+

05-07 2253

05-07 1万+

05-08 4万+

05-10 3247

05-14 6421

05-16 3548

05-16 1万+

05-17 5053

05-30 238

05-20 956

05-18 2210

05-18 8358

05-27 1355

05-18 3541

05-28 1197

05-19 1万+

05-19 1907

05-21 7321

05-21 7359

05-27 5102

#### 为了面个好公司！拼了！3.5W字的Java面试题整理（答案+学习路线）上！

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客