A.1
B.5
C.27
D.45
[单选题]在窗体上画一个名称为Command1的命令按钮,一个名称为Label1的标签,然后编写如下的事件过程: Private Sub Command1_Click()s = 0For i = 0 To 15X = 2 * i - 1If X Mod 3 = 0 Then s = s + 1Next iLabel1.Caption = s End Sub程序运行后,单击命令按钮,则标签中显示的内容为()A . 1B . 5C . 27D . 45
[单选题]在窗体上画一个名称为Command1的命令按钮,一个名称为Label1、Label2、Label3的标签,然后编写如下的事件过程:Private x As Integer Private Sub Command1_Click()Static y As IntegerDim z As Integern = 10z = n + zy = y + zx = x + zLabel1.Caption = xLabel2.Caption = yLabel3.Caption = z End Sub运行程序后,
[单选题]在窗体中添加一个名称为Command1的命令按钮、一个名称为Label1的标签,编写如下代码: Option Base 1 Private Sub Command1_Click( ) a=Array(23,34,25,46,35) ┊ End Sub 过程的功能是求数组a中是奇数的元素的个数,并把结果显示在标签中。为实现此功能,省略号处的程序段应该是A.For i=0 T0 4 If a(i)Mod 2<>0 Then b=b+1 End lf Next i Label1.Caption=
[单选题]在窗体上画一个名称为Command1的命令按钮和三个名称分别为Label1、Label2、Labet3的标签,然后编写如下代码: Private x AS Integer Private Sub Command1_Click( ) Static y As Integer Dim 2 As Integer n=10 Z=n+2 y=y+2 X=X+2 Label1.Caption=x LabelCaption=y LabelCaption=z End Sub 运行程序,连续三次单击命令按钮后,则三
[单选题]在窗体上画一个名称为Command1的命令按钮和三个名称分别为Label1、Label2、Label3的标签,然后编写如下代码: Private x As Integer Private Sub Command1_Click() Static y As Integer Dim z As Integer n=10 z=n+z y=y+z x=x+z Label1.Caption=x Label2.Caption=y Label3.Caption=z End Sub 运行程序,连续三次单击命令按钮后
[单选题]在窗体上画一个名称为Command1的命令按钮,再画两个名称分别为Label1、Label2的标签,然后编写如下程序代码: Private X As Integer Private Sub Command1_Click( ) X=5:Y=3 Call proc(X,Y) Label1.Caption=X LabeLCaption=Y End Sub Private Sub proc(ByVal a As Integer,ByVal b As Integer) X=a*a Y=b+b End Su
[单选题]在窗体上画一个名称为Text1的文本框,一个名称为Command1的命令按钮,然后编写如下事件过程和通用过程:Private Sub Command1_Click()n = Val(Text1.Text) If n/2 = n/2 Then f = f1(n)Else f = f2(n)End IfPrint f; nE.nd SubPublic Function f1(ByRef x)x=x*xf1=x+xE.nd FunctionPublic Function f2(
[单选题]在窗体上画一个名称为Text1的文本框,一个名称为Command1的命令按钮,然后编写如下事件过程和通用过程: Private Sub Command1_Click() n = Val(Text1.Text) If n/2 = n/2 Then f = f1(n) Else f = f2(n) End If Print f; n End Sub Public Function f1(ByRef x) x=x*x f1=x+x End Function Public Function f2(ByV
[单选题]在窗体上画一个名称为Text1的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()D.im array1(10, 10) As IntegerD.im i As Integer, j As IntegerF.or i = 1 To 3F.or j = 2 To 4array1(i, j) = i + jNext jNext iText1.Text = array1(2, 3) + array1(3, 4)E.nd Sub程
[单选题]在窗体上画一个名称为Command1的命令按钮和一个名称为Text1的文本框,然后编写如下事件过程:Private Sub Command1_Click()n = Val(Text1.Text)F.or i = 2 To nF.or j = 2 To sqr(i)If i Mod j = 0 Then Exit ForNext jIf j > Sqr(i) Then Print iNext iE.nd Sub该事件过程的功能是( )。A.输出n以内的奇数B.输出n以内的偶数C.输出n以内的