以下程序的输出结果是( )。 Option Base 1 Private Sub Command1 Click() Dim a(10),p(3)as Integer k=5 For I=1 to 10 a(i)=I Next I For j=1 to 3 p(i)=a(I*j) Next j For I=1 to 3 k=k+p(I)*2 Next I Print k End SubA.33B.28C.35D.37

以下程序的输出结果是( )。 Option Base 1 Private Sub Command1 Click() Dim a(10),p(3)as Integer k=5 For I=1 to 10 a(i)=I Next I For j=1 to 3 p(i)=a(I*j) Next j For I=1 to 3 k=k+p(I)*2 Next I Print k End Sub

A.33

B.28

C.35

D.37


相关考题:

在窗体上添加一个命令按钮控件,名为Command1,事件过程如下,则执行结果是 Option Base 1 Private Sub Command1_Click() Dim a(5)As Integer Dim k As Integer Dim total As Integer a(1) = 2 a(2) = 5 a(3) = 4 a(4) = 10 a(5) = 6 For k = 1 To 5 Total = total + a(k) Next k Print total End SubA. 10 B.15 C. 27 D. 35

在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序: Private Sub Command1 Click() Dim a(10) As Integer Dim x As Integer For i=1 To 10 a(i)=8+i Next x=2 Print a(f(x)+x) End Sub Function f(x As Integer) x=x+3 f=x End Function 程序运行后,单击命令按钮,输出结果为______。A.12B.15C.17D.18

以下程序的输出结果是D)9 12 Option Base 1 Private Sub Command1_Click() Dim s(10),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 subA.33B.28C.35D.37

在窗体中有一个命令按钮command1,编写事件代码如下: Private Sub Command1_Click() Dim s As Integer s=P(1)+P(2)+P(3)+P(4) Debug.Print s End Sub Public Function P(N As Integer) Dim Sum As Integer Sum=0 For i=1 To N Sum=Sum+1 Next i P=Sum End Function 打开窗体运行后,单击命令按钮,输出的结果是( )。A.15B.20C.25D.35

下列程序运行时输出的结果是( )。 Option Base 1 Private Sub Form_Click() Const a=6 Dim x (a) As Integer For I=1 to a x(i)=1^2 Next I Print x(i) End SubA.36B.25C.1D.出错信息

有如下程序:Option Base 1Private Sub Form_Click()Dim arr,SumSum=0For i=1 To 10If arr(i)/3=arr(i)\3 ThenEnd IfNext iEnd Sub程序运行后,单击窗体,消息框的输出结果为( )。

下面程序:________Option Base 1Private Sub Command1_Click() Dim a(10),p(3)As Integer Dim i,k As Integer k=5 For i=1 To 10 a(i)=i Next For i=1 To 3 p(i)=a(i*i) Next For i=1 To 3 k=k+p(i)*2 Next Print kEnd Sub运行后的输出结果为________。A.33B.28C.35D.37

执行以下Command1的Click事件过程,在窗体上显示 Option Base 0 Private Sub Command1_Click() Dim a a = Array("a", "b", "c", "d", "e", "f", "g") Print a(1); a(3); a(5) End SubA.abcB.bdfC.aceD.出错

以下程序的输出结果是( )。 Option Base 1 Private Sub Command1_Click() Dim a(10),p(3) as Integer k=5 For I-1 to 10 a(i)=I Next I For j=1 to3 p(i)=a(I*j) Next j For I=l to 3 k=k+ p (I)*2 Next I Print k End SubA.33B.28C.35D.37

在一个窗体上添加命令按钮控件,名为Command1,事件过程如下,则该过程的执行结果为______。Option Base 1Private Sub Command1_ Click() Dim a(5)As Integer Dim k As Integer Dim Total As Integer a (1)= 2 a (2)= 5 a (3)= 4 a (4)= 10 a (5)= 6 for k =1 To 5 Total = Total +a(k) Next k Print TotalEnd SubA.10B.15C.27D.35

以下有关数组定义的语句序列中,错误的是A.Static arrl(3) arr1(1)=100 arrl(2)="Hello" arrl(3)=123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=InputBOX(“输入:”) ReDim arr2(size) ┄ End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ┄ End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ┄ End Sub

以下有关数组定义的语句序列中,错误的是 ______。A.Static arrl(3) arrl(1)=100 arrl(2)="Hello" arrl(3)123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_click() size=InputBox("输入:") ReDimarr2(size) End SubC.Option Base1 Private Sub Command3_click() Dim arr3(3)As Integer End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer End Sub

执行以下Command1的Click事件过程在窗体上显示 Option Base 1 Private Sub Command1_Click( ) Dim a a=Array(“a”,“b”,“c”,“d”,“e”,“f”,“g”) Printa(1);a(3);a(5) End SubA.abcB.bdfC.aceD.出错

以下有关数组定义的语句序列中,错误的是 ______。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=12345B.Dim arr2()As Integer Dim size As Integer Private Sub Command2_Click() size=Input Box("输入:") ReDimarr2(size) ... End SubC.Option Base 1 Private Sub Command3_Click() Dim arr3(3)As Integer ... End SubD.Dim n As Integer Private Sub Command4_Click() Dim arr4(n)As Integer ... End Sub

现有如下一段程序:Option base 1Private Sub Command1_Click()Dim aa=Array(3,5,7,9)X=1For i=4 to 1 step -1s=s+a(i)*xX=x*10NextPrint sEnd Sub执行程序,单击Command1命令按钮,执行上述事件过程中,输出结果是A)9753B)3579C)35D)79

执行下面的程序,消息框的输出结果是【 】。Option Base1Private Sub Command1_Click( )Dim a(10),P(3)As Integerk=5For i=1 To 10a(i)=iNext iFor i=1 To 3P(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iMsgBox kEnd sub

以下程序运行后输出的结果是 ______。 Option Base 1 Private Sub Form_Click() Dim A(20) For K=1 To 20 A(K)=K^2 Next K Print A(K) End SubA.20B.441C.400D.出错信息

在窗体上添加一个命令按钮,其名为Command1,然后编写代码如下:Option Base 1Private Sub command1_ Click() Dim arr (4)As Integer Dim arrt (4) As Integer for i= 1 To 4 Arr (i)= i arr1 (n)= 2 * n + i Next i Print arr1 (n); arr(n)程序的运行结果为______。A.3 11B.11 3C.10 3D.3 13

在窗体上面1个名称为Command1的命令按钮,然后编写下列事件过程 Option Base 1 Private Sub,Command1 Click( ) Dim a(5,5)ks Integer For i=1 To j For j=1 To 5 a(i,j)=(i+j)*5\10 Next j Next i S=0 For i=1 To j s=s+a(i,i) Next i Print s End Sub 程序运行后,单击命令按钮,输出结果是( )。A.15B.13C.11D.9

执行以下Command1的Click事件过程在窗体上显示 Option Base 1 Private Sub Command1 Click() Dim a a= Array("a", "b", "C", "d", "e", "f", "g") Print a(1); a(3); a(5) End SubA.ab;B.bdfC.aceD.出错

阅读程序: Option Base 1 Dim arr() As Integer Private Sub Form. Click() Dim i As Integer,i As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为A.21B.13C.8D.25

在窗体中添加一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1 Click() Dim a a=Array(2, 4, 6, 8) j=1 For i = 4 To 1 Step -3 s=s+a(i) (j j = j ( 10 Next i Print s End Sub 运行上面的程序,单击命令按钮,其输出结果是A.22B.24C.26D.28

在窗体上画一个名为Command1的命令按钮,然后编写以下程序:Private Sub Command1 Click( ) Dim a(10)As Integer Fork=10 To 1 Step-1 a(k)=20-2*k Next k k=k+7 Print a(k-a(k)) End Sub 运行程序,单击命令按钮,输出结果是( )。A.18B.12C.8D.6

在窗体上画一个命令按钮,其名称为Command1,然后编写下列代码: Option Base l Private Sub Command1 Click( ) Dim a a=Array(1,2,3,4) j=1 For i=4 To 1 Step-1 s=s+a(i)*j j=j*10 Next i Print S End Sub 程序运行后,单击命令按钮,其输出结果是( )。A.4321B.1234C.34D.12

以下有关数组定义的语句序列中,错误的是______。A.Static arrl(3) arrl(1)=100 arrl(2)="Hello" arrl(3)=123.45B.Dim arr2()As Integer Dim size As Integer Private Sub Command2 Click() size=InputBox("输入:") ReDimarr2(size) End SubC.Option Basel Private Sub Command3 Click() Dim arr3(3)As Integer End SubD.Dim n As Integer Private Sub Command4 Click() Dim arr4(n) As Integer End Sub

在窗体上画一个命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1 Click() Dim Arr1(12)As Integer, Arr2(3)As Integer Dim Sum As Integer Sum = 2 For i=1 To 12 Arrl(i)= i Next i For i=1 To 3 Arr2(i)= Arrl(i*i) Next i For i = 1 To 3 Sum = Sum + Arr2(i) Next i Print Sum End Sub 程序运行后,单击命令按钮,在窗体上的输出结果为A.16B.24C.32D.36

以下有关数组定义的语句序列中,错误的是( )。A.Static arr1(3) arr1(1)=100 arr1(2)="Hello" arr1(3)=123.45B.Dim arr2() AsInteger Dim size As Integer Private Sub Command2_Click () size=InputBox("输入:") ReDim arr2(size) …… EndSubC.Option Base 1 Private Sub Command3 Click() Dim art3(3) As Integer …… End SubD.Dim n As Integer Private Sub Command4 Cliok() Dim arr4(n)As Integer …… End Sub