用vb解一道题:一张已知厚度的纸对折多少次能达到8380米?
答案:4 悬赏:0 手机版
解决时间 2021-01-20 14:12
- 提问者网友:缘字诀
- 2021-01-19 22:04
用vb解一道题:一张已知厚度的纸对折多少次能达到8380米?
最佳答案
- 五星知识达人网友:野慌
- 2021-01-19 22:10
dim a,b as long
a=0:b=0.0001
do until a>=8380
a=a+1
b=2b
loop
label1.text=a
a=0:b=0.0001
do until a>=8380
a=a+1
b=2b
loop
label1.text=a
全部回答
- 1楼网友:持酒劝斜阳
- 2021-01-19 23:45
dim n as long,hou as single
hou=0.0001
do until hou>=8380
hou=hou*2
n=n+1
loop
msgbox "对折" & n & "次即可。"
hou=0.0001
do until hou>=8380
hou=hou*2
n=n+1
loop
msgbox "对折" & n & "次即可。"
- 2楼网友:洒脱疯子
- 2021-01-19 23:08
dim n as integer
n=0
dim s as double
s=0.0001
do until s>=8380
n=n+1
s=s*2
loop
msgbox n
n=0
dim s as double
s=0.0001
do until s>=8380
n=n+1
s=s*2
loop
msgbox n
- 3楼网友:鱼芗
- 2021-01-19 22:25
Private Sub Command1_Click()
Dim X As Integer, CSH As Single
X = 0: CSH = 0.0001
Do Until CSH >= 8380
CSH = CSH * 2
X = X + 1
Loop
MsgBox "只要对折" & X & "次,其厚度可达到8380米。", 48, "提示"
End Sub
Dim X As Integer, CSH As Single
X = 0: CSH = 0.0001
Do Until CSH >= 8380
CSH = CSH * 2
X = X + 1
Loop
MsgBox "只要对折" & X & "次,其厚度可达到8380米。", 48, "提示"
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯