2个回答
展开全部
dim N as long
dim i as integer
N = 1300000000
i = 0
while N<2600000000
N = N * (1 + 0.8)
i = i + 1
Wend
MsgBox i & "年以后,中国人口将超过26亿!"
dim i as integer
N = 1300000000
i = 0
while N<2600000000
N = N * (1 + 0.8)
i = i + 1
Wend
MsgBox i & "年以后,中国人口将超过26亿!"
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Option Explicit
Private Sub Form_Load()
Dim nowA As Single
Dim MaxB As Single
Dim nIna As Long
nIna = 2009
nowA = 13
Do
nIna = nIna + 1
MaxB = nowA + nowA * 0.008
If MaxB > 26 Then
Exit Do
End If
nowA = MaxB
Loop
Debug.Print nIna, MaxB
End Sub
结果
2096 年,人口将达到 26.00218 亿人
Private Sub Form_Load()
Dim nowA As Single
Dim MaxB As Single
Dim nIna As Long
nIna = 2009
nowA = 13
Do
nIna = nIna + 1
MaxB = nowA + nowA * 0.008
If MaxB > 26 Then
Exit Do
End If
nowA = MaxB
Loop
Debug.Print nIna, MaxB
End Sub
结果
2096 年,人口将达到 26.00218 亿人
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询