> 数学 >
已知现在我国人口年平均增长率为1.5%,设现有人口总数为13亿,设计算法求多少年后人口数将达到或超过15亿
用Do Loop 语句写算法
人气:134 ℃ 时间:2020-04-01 09:13:58
解答
Dim n As Double

Dim y As Integer

y = 0

n = 13

Do While n <= 15

'0.195= 13*1.5% 
n = n + 0.195       
y = y + 1

Loop

MsgBox y
推荐
猜你喜欢
© 2026 79432.Com All Rights Reserved.
电脑版|手机版