按键精灵的一个二维数组赋值程式,因为二维数组的下标不确定,这个程式错误,请高手帮助改改
ZDS=inputbox("请输入总栋数!")DimJS()m=1n=1Fori=1ToZDSCS=inputbox("请输入"&m&"栋总层数!")Forj=1ToCS...
ZDS = inputbox("请输入总栋数!")
Dim JS()
m = 1
n = 1
For i = 1 To ZDS
CS = inputbox("请输入" & m & "栋总层数!")
For j = 1 To CS
JS(i,j) =inputbox("请输入"&m &"栋"&n &"层间数")
j = j + 1
n = n + 1
Next
i = i + 1
m = m + 1
Next 展开
Dim JS()
m = 1
n = 1
For i = 1 To ZDS
CS = inputbox("请输入" & m & "栋总层数!")
For j = 1 To CS
JS(i,j) =inputbox("请输入"&m &"栋"&n &"层间数")
j = j + 1
n = n + 1
Next
i = i + 1
m = m + 1
Next 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏80(财富值+成长值)
2个回答
展开全部
ZDS = inputbox("请输入总栋数!")
Dim JS()
ReDim JS(0)
m = 1
n = 1
If ZDS > "" Then
ZDS=int(ZDS)
For i = 1 To ZDS
CS = inputbox("请输入" & m & "栋总层数!")
cs=int(cs)
For j = 1 To CS
o=int(i & j)
If o > p Then
Redim Preserve JS(o)
p=int(i & j)
Else
p=int(i & j)
End If
JS(p) =int(inputbox("请输入"&m &"栋"&n &"层间数"))
j = j + 1
n = n + 1
Next
i = i + 1
m = m + 1
Next
End If
MessageBox join(JS)
Dim JS()
ReDim JS(0)
m = 1
n = 1
If ZDS > "" Then
ZDS=int(ZDS)
For i = 1 To ZDS
CS = inputbox("请输入" & m & "栋总层数!")
cs=int(cs)
For j = 1 To CS
o=int(i & j)
If o > p Then
Redim Preserve JS(o)
p=int(i & j)
Else
p=int(i & j)
End If
JS(p) =int(inputbox("请输入"&m &"栋"&n &"层间数"))
j = j + 1
n = n + 1
Next
i = i + 1
m = m + 1
Next
End If
MessageBox join(JS)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询