下列VB 程序运行时,单机命令按钮 Command1后,文本框Text1现实的内容是___________
PrivateSubCommand1_Click()Dima(1To10)AsInteger,iASInteger,sAsIntegera(1)=1:a(2)=1Fori...
Private Sub Command1_Click()
Dim a(1To10)As Integer,i AS Integer, s As Integer
a(1)=1:a(2)=1
For i=3To10
a(i)=a(i-1)+a(i-2)
Next i
Text1.Text=Str(a(i-1))
End Sub 展开
Dim a(1To10)As Integer,i AS Integer, s As Integer
a(1)=1:a(2)=1
For i=3To10
a(i)=a(i-1)+a(i-2)
Next i
Text1.Text=Str(a(i-1))
End Sub 展开
2个回答
展开全部
得数55
从FOR循环得出a(3)=2,a(4)=3.........a(9)=34,a(10)=55,a(11)=89
Next i 结束后得到i=11 a(i-1)=a(10)=55
从FOR循环得出a(3)=2,a(4)=3.........a(9)=34,a(10)=55,a(11)=89
Next i 结束后得到i=11 a(i-1)=a(10)=55
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询