vb中2^2^0=?
答案:2 悬赏:0 手机版
解决时间 2021-03-17 05:56
- 提问者网友:我是我
- 2021-03-17 02:30
vb中2^2^0=?
最佳答案
- 五星知识达人网友:杯酒困英雄
- 2021-03-17 04:08
结果是2
2^0 = 1 ,
2^2^0=2^1 = 2
2^0 = 1 ,
2^2^0=2^1 = 2
全部回答
- 1楼网友:酒安江南
- 2021-03-17 04:41
上面是运行图,下面是代码:dim x as single, n as single, z as doubleprivate sub command1_click()z = 0x = val(text1.text)n = val(text2.text)if x = 0 then msgbox "", 16, "" exit subend ifif n = 0 then msgbox "", 16, "" exit subend iffor i = 2 to nz = z + xn(x, n)next ilabel1.caption = zend subprivate function xn(a as single, b as single) as doublexn = (a + b) ^ bend functionprivate sub form_load()label1.caption = ""end sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯