在n个运动员中选出任意r个人参加比赛,有很多种不同的选法,选法的个数可以用公式(作图)计算,在窗体上设计3个文本框,名称依次是Text1、Text2、Text3。程序运行时在Text1、Text2中分别输入n和r的值,单击Command1按钮即可求出选法的个数,并显示在Text3文本框中,请在空白处填入适当语句使程序完整。
Prvate Sub Command1_C1ick()
Dimr As Integer,n As Integer
n=Text1
r=TeXt2
Text3=fun(n))(______))fun(r)
End Sub
Function fun(n As Integer)As long
Dim t AS Long
For k=1 To n
t=t*k
Next k
fun=t
End Function
订单号:
遇到问题请联系在线客服
订单号:
遇到问题请联系在线客服