能不能用VB写运算排列组合程序
2个回答
展开全部
组合数:
Private Sub Command1_Click()
a = Val(Text2.Text)
b = Val(Text1.Text)
n = 1
s = a
t = b
Do Until n = b
n = n + 1
a = a - 1
s = s * a
Loop
Do Until b = 1
b = b - 1
t = t * b
Loop
Text3.Text = s / t
End Sub
排列数:
Private Sub Command1_Click()
a = Val(Text2.Text)
b = Val(Text1.Text)
n = 1
s = a
Do Until n = b
n = n + 1
a = a - 1
s = s * a
Loop
Text3.Text = s
End Sub
Private Sub Command1_Click()
a = Val(Text2.Text)
b = Val(Text1.Text)
n = 1
s = a
t = b
Do Until n = b
n = n + 1
a = a - 1
s = s * a
Loop
Do Until b = 1
b = b - 1
t = t * b
Loop
Text3.Text = s / t
End Sub
排列数:
Private Sub Command1_Click()
a = Val(Text2.Text)
b = Val(Text1.Text)
n = 1
s = a
Do Until n = b
n = n + 1
a = a - 1
s = s * a
Loop
Text3.Text = s
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询