请教金额小写转换成大写怎么写?

比日说100204011.32怎么写大写的呢?还有102451.12... 比日说100204011.32怎么写大写的呢?
还有102451.12
展开
 我来答
匿名用户
2013-09-24
展开全部
100204011.32写成大写为:壹亿零贰百万肆千零壹拾壹元叁角贰分。102451.12 写成大写为:拾万贰千肆百伍拾壹元壹角贰分。
匿名用户
2013-09-24
展开全部
以下是一段用VBA代码编写的金额小写转大写的函数:
public function zdx(x as currency) as string
dim lnp as integer
dim prc as string
dim tmp as string
dim nob as currency
dim dx as string
dim xx as string
dim zhen as boolean
dim str(10) as string
dim china as string
china = "分角元拾佰仟万拾佰仟亿"
str(0) = "零"
str(1) = "壹"
str(2) = "贰"
str(3) = "叁"
str(4) = "肆"
str(5) = "伍"
str(6) = "陆"
str(7) = "柒"
str(8) = "捌"
str(9) = "玖"
zhen = true
x = formatnumber(x, 2)
prc = cstr(x)
prc = replace(prc, ",", "")
lnp = len(prc)
for i = lnp - 1 to 1 step -1
if mid(prc, i, 1) = "." then
select case lnp - i
case 1
prc = replace(prc, ".", "") + "0"
case 2
prc = replace(prc, ".", "")
end select
zhen = false
exit for
end if
next i
if zhen then prc = prc + "00"
lnp = len(prc)
for i = 1 to lnp
tmp = str(mid(prc, i, 1)) & tmp
next i
zdx = ""
fy = 1
for i = 1 to lnp
xx = mid(tmp, i, 1)
dx = mid(china, i, 1)
if xx <> "零" then
zdx = xx & dx & zdx
f = 1
else
if i = 3 then
zdx = dx & zdx
end if
if i = 7 then
zdx = dx & zdx
end if
if f then
zdx = "零" & zdx
end if
f = 0
end if
next i
if zhen then zdx = zdx + "正"
zdx = replace(zdx, "零万", "万")
zdx = replace(zdx, "零元", "元")
end function
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2013-09-24
展开全部
壹拾万零贰千肆佰五拾壹元壹角贰分 一亿零贰拾万零肆仟零壹拾壹元三叁角贰分
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式