若有数组说明语句为:Dim a(-3 to 8),则数组a包含元素的个数是().
以下程序Option Base 1Private Sub Command1 _Click()Dim a%(3,3)For i=1 To 3For j=1 To 3If j>1 And i>1 Thena(i,j)=a(a(i-1,j-1),a(i,j-1))+1Elsea(i,j)=i*jEnd IfPrint a(I,j);"";Next jPrintNext iEnd Sub输出结果是().
要分配存放如下方阵的数据:1.1 2.2 3.34.4 5.5 6.67.7 8.8 9.9数组声明语句能实现(不能浪费空间)的是().
有如下程序: Const n=-5:Const M=6 Dim a(n To M) As Integer For i=Lbound(a,1) To Ubound(a,1) A(i)=I Next I Print a(Lbound(a,1));a(Ubound(a,1)) 运行后输出结果为().
下面数组说明语句错误的是().
程序的输出结果是(). OPtion Base 1 Private Sub Command1_Click() Dim Arr1(12) As Integer,Arr2(4) As Integer For i=1 To 12 Arr1(i)=i Next i For j=1 To 4 Arr2(j)=Arr1(3∗j) Next j For k=1 To 4 S=s+Arr2(k) Next k Print s End Sub
下列程序段的执行结果为(). Dim M(10) As Integer For i=0 To 10 M(i)=2∗i Next i Print M(M(3))
已知有数组声明:Dim a(-1 To 3,2 To 5)As integer,如下引用数组中的元素,正确的是().
在Visual Basic中,下面的4个数组说明语句语法正确的是().
在窗体上添加一个命令按钮,编写如下代码: Private Sub Command1_Click Dim Arr1(10) as Integer ,Arr2(10) As Integer N=3 For i=1 to 5 Arr1(i)=i Arr2(n)=2∗n+i Next i Print Arr2(n), Arr1(n) End Sub 程序运行后,单击命令按钮,输出结果是().
语句Dim arr(-3 To 5,2 To 6) As Integer定义的数组元素有().
在窗体上添加一个命令按钮,编写如下代码: Option Base 1 Private Sub Command1_Click Dim a(10) As Integer,p(3)As Integer K=5 For i=1 To 10 A(i)=i Next i For i=1 To 3 P(i)=a(i∗i) Next i For i=1 To 3 K=k+p(i)∗2 Next i Print k End Sub 程序运行后,单击命令按钮,输出结果是().
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim A(10) AS Integer For i=1 To 5 A(i) = i A(i + 5) = i Next i For i=1 To 10 S = s + A(i) Next i Print S End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是().
在窗体上添加一个命令按钮,编写如下代码: Option Base 1 Private Sub Command1_Click Dim a A=Array(1,2,3,4) J=1 For i=4 To1 Step -1 S=s+a(i)∗j J=j∗10 Next i Print s End Sub 程序运行后,单击命令按钮,输出结果是().
有如下程序,运行后输出的是(). Private Sub Command1_Click() Dim aj(1 To 10) As Integer For j=6 To 10 Aj(j)=j∗2 Next j Print aj(1)+aj(j) End Sub