pb人民币大写函数
DR钻戒徐州苏宁广场店
2024-12-02 07:23:01
最佳回答
string ls_bit[18] = {'仟','佰','拾','万','仟','佰','拾','亿','仟','佰','拾','万','仟','佰','拾','元','角','分'}string ls_num[9] = {'壹','贰','叁','肆','伍','陆','柒','捌','玖'}string ls_r = '', ls_je, ls_clong i, kls_je = string( data * 100, fill( '#', 18 - 1 ) + '0' )k = 18 - len( ls_je ) + 1for i = k to 18 ls_c = mid( ls_je, i - k + 1, 1 ) if ls_c = '0' then if pos( ls_bit[i - 1], '零' ) > 0 then ls_bit[i - 1] = ''; if ls_bit[i] <> '亿' and ls_bit[i] <> '万' and ls_bit[i] <> '元' then ls_bit[i] = '零' else ls_bit[i] = ls_num[long(ls_c)] + ls_bit[i] end ifnextif ls_c = '0' then ls_bit[18] = '整'if ls_bit[9] = '' and ls_bit[10] = '' and ls_bit[11] = '' then ls_bit[12] = ''for i = k to 18 ls_r = ls_r + ls_bit[i]nextif ls_r="整" then ls_r="零元整"return ls_r以上希望对你有所帮助 20210311