一个富翁试图与陌生人做一笔换钱生意,换钱规则为
答案:2 悬赏:60 手机版
解决时间 2021-11-25 11:27
- 提问者网友:太高姿态
- 2021-11-24 22:43
一个富翁试图与陌生人做一笔换钱生意,换钱规则为
最佳答案
- 五星知识达人网友:孤独的牧羊人
- 2021-11-24 23:43
Private Sub Form_Click()
Dim a#, b#, c#
b = 0.01
a = 100000 * 30
For i = 1 To 30
c = c + b
b = 2 * b
Next i
Print "陌生人给富翁的钱为:"; Format(a, "0,000,000.00") & "元"
Print "富翁给陌生人的钱为:"; Format(b, "0,000,000.00") & "元"
End Sub
Dim a#, b#, c#
b = 0.01
a = 100000 * 30
For i = 1 To 30
c = c + b
b = 2 * b
Next i
Print "陌生人给富翁的钱为:"; Format(a, "0,000,000.00") & "元"
Print "富翁给陌生人的钱为:"; Format(b, "0,000,000.00") & "元"
End Sub
全部回答
- 1楼网友:老鼠爱大米
- 2021-11-25 00:35
dim i as integerdim sum as doubledim mr as double=陌生人付出的钱dim n as intdim tf as Boolean=falsefor i=1 to 30 sum =sum+1*2if sum>mr and tf=false thentf=truen=iend ifnextmsgbox("一共付出" & sum &chr(10) & "第" & n & "天 超过陌生人")
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯