别人给了一个判断button按下的脚本,有几行不明白啊,求分析
1个回答
展开全部
发过来看看呀?
没有脚本我们也看不懂啊
Dim st As String = ""
Dim a(100)
a(1) = 0 : a(2) = 1
For i = 3 To 100
a(i) = a(i - 2) + a(i - 1)
Next i
For i = 1 To 10
st = st & a(i) & " "
If i Mod 10 = 0 Then st = st & vbCrLf
Next i
TextBox6.Text = st
Public Function f(ByVal n As Integer) As Integer
Dim res As Integer
If n = 1 Or n = 2 Then
res = 1
End If
If n = 3 Then
res = 2
End If
If n > 3 Then
res = f(n - 1) + f(n - 2)
End If
Return res
End Function
没有脚本我们也看不懂啊
Dim st As String = ""
Dim a(100)
a(1) = 0 : a(2) = 1
For i = 3 To 100
a(i) = a(i - 2) + a(i - 1)
Next i
For i = 1 To 10
st = st & a(i) & " "
If i Mod 10 = 0 Then st = st & vbCrLf
Next i
TextBox6.Text = st
Public Function f(ByVal n As Integer) As Integer
Dim res As Integer
If n = 1 Or n = 2 Then
res = 1
End If
If n = 3 Then
res = 2
End If
If n > 3 Then
res = f(n - 1) + f(n - 2)
End If
Return res
End Function
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询