展开全部
If Text1.Text = "" Then Exit Sub
temp = Text1.Text
temp2 = temp \ 100 '百元有几张
If temp2 <> 0 Then out = "100元有" & temp2 & "张" & Chr(13) '如果不为0
temp = temp Mod 100 '除100取余
temp2 = temp \ 50 '50元有几张
If temp2 <> 0 Then out = out & "50元有" & temp2 & "张" & Chr(13)
temp = temp Mod 50 '除50取余
temp2 = temp \ 20 '20元有几张
If temp2 <> 0 Then out = out & "20元有" & temp2 & "张" & Chr(13)
temp = temp Mod 20 '除20取余
temp2 = temp \ 10 '10元有几张
If temp2 <> 0 Then out = out & "10元有" & temp2 & "张" & Chr(13)
temp = temp Mod 10 '除10取余
temp2 = temp \ 5 '5元有几张
If temp2 <> 0 Then out = out & "5元有" & temp2 & "张" & Chr(13)
temp = temp Mod 5 '除5取余
temp2 = temp \ 2 '2元有几张
If temp2 <> 0 Then out = out & "2元有" & temp2 & "张" & Chr(13)
temp = temp Mod 2 '除5取余
temp2 = temp \ 1 '2元有几张
If temp2 <> 0 Then out = out & "1元有" & temp2 & "张" & Chr(13)
MsgBox out
temp = Text1.Text
temp2 = temp \ 100 '百元有几张
If temp2 <> 0 Then out = "100元有" & temp2 & "张" & Chr(13) '如果不为0
temp = temp Mod 100 '除100取余
temp2 = temp \ 50 '50元有几张
If temp2 <> 0 Then out = out & "50元有" & temp2 & "张" & Chr(13)
temp = temp Mod 50 '除50取余
temp2 = temp \ 20 '20元有几张
If temp2 <> 0 Then out = out & "20元有" & temp2 & "张" & Chr(13)
temp = temp Mod 20 '除20取余
temp2 = temp \ 10 '10元有几张
If temp2 <> 0 Then out = out & "10元有" & temp2 & "张" & Chr(13)
temp = temp Mod 10 '除10取余
temp2 = temp \ 5 '5元有几张
If temp2 <> 0 Then out = out & "5元有" & temp2 & "张" & Chr(13)
temp = temp Mod 5 '除5取余
temp2 = temp \ 2 '2元有几张
If temp2 <> 0 Then out = out & "2元有" & temp2 & "张" & Chr(13)
temp = temp Mod 2 '除5取余
temp2 = temp \ 1 '2元有几张
If temp2 <> 0 Then out = out & "1元有" & temp2 & "张" & Chr(13)
MsgBox out
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
www.csdn.net
对你会有帮助的
对你会有帮助的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询