已知A1=0,A2=1,A3=2,A4=A1+2*A2+A3;A5=A2+2*A3+A4...求A23
PrivateSubForm_Click()DimaAsLong,bAsLong,cAsLong,dAsLong,eAsLong,fAsLong,gAsLonga=0:b...
Private Sub Form_Click()
Dim a As Long, b As Long, c As Long, d As Long, e As Long, f As Long, g As Long
a = 0: b = 1: c = 2
For e = 1 To 20
For f = 1 To 20
For g = 1 To 20
d = a + 2 * b + c
Next g
Next f
Next e
Print d
End Sub
------------------------调试,显示结果为4,显然不可能,我错在哪咯?---------------------------------------------------------- 展开
Dim a As Long, b As Long, c As Long, d As Long, e As Long, f As Long, g As Long
a = 0: b = 1: c = 2
For e = 1 To 20
For f = 1 To 20
For g = 1 To 20
d = a + 2 * b + c
Next g
Next f
Next e
Print d
End Sub
------------------------调试,显示结果为4,显然不可能,我错在哪咯?---------------------------------------------------------- 展开
10个回答
展开全部
Private Sub Command1_Click()
Dim a As Long, b As Long, c As Long, d As Long
a = 0: b = 1: c = 2
For i = 4 To 23
d = a + 2 * b + c
a = b
b = c
c = d
Next i
Print c
End Sub
Dim a As Long, b As Long, c As Long, d As Long
a = 0: b = 1: c = 2
For i = 4 To 23
d = a + 2 * b + c
a = b
b = c
c = d
Next i
Print c
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
4 A1=0,A2=1,A3=2,A4=A1+2*A2+A3;A5=A2+2*A3+A4...求A23
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
1111111111111111111111111111
参考资料: 111111111
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
,本来就是4的嘛,
一下子想不出关系来,只能先这样算了.
呵呵,楼上的已经做好了啊,没看到呢
Private Sub Command1_Click()
Dim a(23) As Long
a(1) = 0
a(2) = 1
a(3) = 2
For i = 4 To 23
a(i) = a(i - 3) + 2 * a(i - 2) + a(i - 1)
Next
Print a(23)
End Sub
一下子想不出关系来,只能先这样算了.
呵呵,楼上的已经做好了啊,没看到呢
Private Sub Command1_Click()
Dim a(23) As Long
a(1) = 0
a(2) = 1
a(3) = 2
For i = 4 To 23
a(i) = a(i - 3) + 2 * a(i - 2) + a(i - 1)
Next
Print a(23)
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询