1vb能换多少usdt
A. 求VB编程1元整钱共换成50个1分,2分,5分的零钱,每种零钱最少1个,求一共有多少种换零方式及每种方式1分,2
程序如下
Private Sub Command1_Click()
Print "5分钱的个数 2分钱的个数 1分钱的个数"
For i = 1 To 9 '5分钱个数
For j = 1 To 49 '2分钱个数
If (i * 5 + j * 2 + (50 - i - j)) = 100 Then Print i, j, 50 - i - j
Next j
Next i
End Sub
若满意请及时采纳,谢谢
B. 求VB编程:货币兑换,输入人民币,兑换成美元,比例1:8.25
有的地方没说清楚
大概写了下
界面格式如下:
label1 [text1] label2 option1
option2
command1 command2 command3
Private Sub Command1_Click()
End
End Sub
Private Sub Command2_Click()
If Option1.Value = True Then
Label1.Caption = "美元币种"
Text1.Text = 8.25 * CDbl(Text1.Text)
End If
If Option2.Value = True Then
Label1.Caption = "港币币种"
Text1.Text = 1.15 * CDbl(Text1.Text)
End If
End Sub
Private Sub Command3_Click()
Text1.SetFocus
Text1.SelLength = (Text1)
End Sub
Private Sub Form_Load()
Command1.Caption = "退出"
Command2.Caption = "兑换"
Command3.Caption = "清除"
Option1.Caption = "美元"
Option2.Caption = "港币"
Label1.Caption = "人民币兑换"
Label2.Caption = "兑换币种"
Option1.Value = True
End Sub
C. 70分求VB用一元人民币兑换成1分,2分,和5分硬币,共有多少种不同的兑换方法
拖一个按钮 粘贴下面代码就可以了
Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim x As Integer
Print "1分", "2分", "5分"
For i = 1 To 100
For j = 2 To 100 Step 2
For k = 5 To 100 Step 5
If i + j + k = 100 Then
Print i, j, k
x = x + 1
End If
Next k
Next j
Next i
Me.Caption = "共" & x & "种"
End Sub
D. vb 将100元换成10元,5元和1元的组合,一共多少种组合方法
这是每种钱币至少一张时的换法,如允许为0,可将1改为0(共3处)
PrivateSubCommand1_Click()
List1.AddItem"10元5元1元"
Fora=1To19
Forb=1To(100-10*a-1)5
c=100-10*a-5*b
List1.AddItem""&a&""&b&""&c
n=n+1
Nextb
Nexta
List1.AddItem"共"&n&"种"
EndSub
E. 换零钱问题。将一元钱换成1分,2分,或5分的零钱有多少换法。vb编程
思路:
1元最多换100个1分,50个2分和20个5分的
代码:
Private Sub Command1_Click()
Dim I As Integer, J As Integer, K As Integer, SUM As Single, N As Integer
For I = 0 To 100
For J = 0 To 50
For K = 0 To 20
SUM = I * 0.01 + J * 0.02 + K * 0.05
If SUM = 1 Then
List1.AddItem "1分" & I & "个;2分" & J & "个;5分" & K & "个"
N = N + 1
End If
Next K
Next J
Next I
MsgBox "共" & N & "种换法"
End Sub
如果是每次换都必须有3种硬币,那就要将上面代码中的FOR循环从1开始循环
分别是541和461种换法
F. 1人民币能兑换多少柬埔寨币
柬埔寨现行货币的单位是瑞尔(RIEL),现行的货币有一百、二百、五百、一千、二千、五千、一万、二万、五万、十万瑞尔等十种纸币,但二万瑞尔以上的货币极少见,硬币几乎不使用。
目前1美元兑换率约4千瑞尔(2005年十月US1-4000RIEL)。
1元人民币 换520元瑞尔(Riel)
G. vb6.0 人民币与美元互相兑换 代码是什么
PrivateSubCommand1_Click()
Text1.Text=Val(Text3.Text)/Val(Text2.Text)
EndSub
PrivateSubCommand2_Click()
Text3.Text=Val(Text1.Text)*Val(Text2.Text)
EndSub
PrivateSubCommand3_Click()
Text3.Text=""
Text1.Text=""
Text2.Text=""
EndSub
PrivateSubCommand4_Click()
End
EndSub
H. VBusdt我以15块钱一个的价钱买进,现在跌到了3块,请问我还有多少钱
如果是这种情况的话,那么你就要看你是购买了多少个,如果你只购买了10个的话,那么现在来讲的话,你还有的钱数就应该是10×3=30。因为你现在来讲的话,所剩的钱应该是以这个单价乘以数量来进行计算的,而不是依照你购买时候的价格来进行计算的,因为你现在的价格已经跌到了三块钱,那么你就只能以三块钱的价格进行出售。
I. 怎么用VB计算把一元整钱换成零钱有几种算法
共4562种取法。程序如下:
Private Sub Command1_Click()
Dim A1 As Integer, A2 As Integer, A5 As Integer, A10 As Integer, A20 As Integer, A50 As Integer, S As Integer
Dim R As String, N As Long
For A1 = 0 To 100
For A2 = 0 To 50
For A5 = 0 To 20
For A10 = 0 To 10
For A20 = 0 To 5
For A50 = 0 To 2
S = A1 + 2 * A2 + 5 * A5 + 10 * A10 + 20 * A20 + 50 * A50
If S = 100 Then
If A1 <> 0 Then R = R + "一分" + Str(A1) + "个,"
If A2 <> 0 Then R = R + "二分" + Str(A2) + "个,"
If A5 <> 0 Then R = R + "五分" + Str(A5) + "个,"
If A10 <> 0 Then R = R + "一毛" + Str(A10) + "个,"
If A20 <> 0 Then R = R + "两毛" + Str(A20) + "个,"
If A50 <> 0 Then R = R + "五毛" + Str(A50) + "个,"
R = Left(R, Len(R) - 1) + "。"
Debug.Print R
N = N + 1
R = ""
End If
Next: Next: Next: Next: Next: Next
Debug.Print "共"; N; "种取法。"
End Sub
你也可以把结果输出到文件中。
J. VB编程美元兑换人民币代码
private sub command1_click()
dim m as single,r as single,h as single
m=val(text1.text) '美元数量
h=8.099 '汇率
r=m*h '换算
label1.caption=Format (r, "#.##") '显示兑换的人民币数量
end sub