在vb中,类型不匹配;缺少数组或用户定义类型 题目是,产生26个6到23之间的随机数,用fu
2015-07-05
展开全部
Private Function jc(p As Integer)
Dim s As Double
s = 1
For i = 1 To p
s = s * i
Next i
jc = s
End Function
Private Sub Command1_Click()
Dim i As Integer, n As Integer
Dim s As Double
For i = 1 To 26
n = Int(Rnd * (23 - 6 + 1) + 6)
s = jc(n)
Print n & "!=" & s
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询