VB题,速答
1个回答
展开全部
Private Sub Command1_Click()
Label3.Caption = mySum(Val(Text1.Text))
End Sub
Private Sub Command2_Click()
Label3.Caption = mySum(Val(Text1.Text)) / Val(Text1.Text)
End Sub
Private Function mySum(ByVal n As Integer) As Long
Dim i As Integer, t As Long
For i = 1 To n
t = t + i
Next
mySum = t
End Function
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询