VB问题 VBVB 利用Array函数给数组a赋值答:Private Sub Command1_Click() '用字典高效简洁 Dim arr, i, n, s, temp() arr = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) s = InputBox("输入一个值") Print "处理前:" & Join(arr, ",") With CreateObject("Scripting.Dictionary") For i = LBound(arr) To UBound(...
vb 利用Array函数将1,2,3,4,5,6,7,8赋值给数组,再从键盘上输入一个数据...答:i As Integer, x As Integera = Array(1, 2, 3, 4, 5, 6, 7, 8)x = Val(InputBox("请输入一个数"))For i = LBound(a) To UBound(a) If Val(a(i)) = x Then Exit ForNext iIf i > UBound(a) Then MsgBox "没有这个数"Else MsgBox "输入的数是数组中第" &...