当Form1_Click事件发生时,窗体上显示的第三行是( )。 Dim i As Integer,j As Integer,a(5,5) As Integer For i=1 To 5 For j=1 To 5 If(i<=j)Then a(i,j)=1 Else a(i,j)=0 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j), Next j Print Next i End SubA.0 0 0 1 1B.0 0 1 1 1C.0 1 1 1 1D.1 1 1 1 1

当Form1_Click事件发生时,窗体上显示的第三行是( )。 Dim i As Integer,j As Integer,a(5,5) As Integer For i=1 To 5 For j=1 To 5 If(i<=j)Then a(i,j)=1 Else a(i,j)=0 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j), Next j Print Next i End Sub

A.0 0 0 1 1

B.0 0 1 1 1

C.0 1 1 1 1

D.1 1 1 1 1


相关考题:

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim m As Integer, n As Integer, p As Integerm=3: n=5: p=0Call Y(m, n, p)Print Str(p)End SubSub Y(ByVal i As Integer, ByVal j As Integer, k As Integer)k=i + jEnd Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.4B.6C.8D.10

在窗体上画一个名称为Label1的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10, 10)As Integer Dimi As Integer, j As Integer For i=2 To 4 For j=2 To 4 arr(i, j)=i*j Next j Next i Label1. Caption=Str(arr(2, 2)+arr(3, 3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是______。A.12B.13C.14D.15

在窗体上画一个名称为Labell的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j=2 To 4 arr(i,j)=i*j Next j Next i Labell.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是A. 12B.13C.14D.15

下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 To 3 For j=0 To 3 x=x+m(i,j) Next Next Print xA.3B.4C.5D.6

在窗体上绘制一个名称为Label1的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j =2 To 4 arr(i,j)=i*j Next j Next i Label1.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是( )。A.12B.13C.14D.15

在窗体上画—个命令按钮(其名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() Dim a(5,5)As Integer Dim i As Integer,j As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j) Next j Print Next i End Sub 程序运行后,单击命令按钮,在窗体上的输出结果是:_______。A.1 4 7 2 5 8 3 6 9B.1 2 3 4 5 6 7 8 9C.1 2 3 4 5 6 7 8 9D.没有输出

当Form1_Click事件发生时,窗体上显示的第三行是( )。 Option Base 1 Private Sub Form_Click() Dim i As Integer,j As Integer Dim k As Integer,a(5,5)As Integer For i=1 To 5 k=1 For j=1 To 5 If i<=j Then a(i,j)=k k=k+1 Else a(i,j)=1 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j); Next j Print Next i End SubA.1 2 3 4 5B.1 1 2 3 4C.1 1 1 2 3D.1 1 1 1 2

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click( ) Dim m As Integer,n As Integer,p As Integer m=3:n=5:p=O Call Y(m,n,p) Print Str(p)End SubSub Y(ByVal i As Integer,ByVal j As Integer,k As Integer) k=i + jEnd Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是A.4B.6C.8D.10

在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim m As Integer, n As Integer, p As Integer m=3: n=5: p=0 Call Y(m, n, p) Print Str(p) End Sub Sub Y(ByVal i As Integer, ByVal j As Integer, k As Integer) k=i+j End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )A.4B.6C.8D.10

设有如下程序: Option Base 1 Private Sub Command1 Click() Dim a(10) As Integer Dim n As Integer n=InputBox(“输入数据”) If n< 10 Then Call,GetArray(a, n) End If End Sub Private Sub GetArray(b() As Integer, n As Integer) Dim c(10)As Integer j=0 For i=1 To n b(i)=CInt(Rnd()*100) If b(i) /2 =b(i) \2 Then j=j + 1 c(j) = b(i) End If Next Print j End Sub 以下叙述中错误的是A.数组b中的偶数被保存在数组c中B.程序运行结束时,在窗体上显示的是c数组中元素的个数C.GetArray过程的参数n是按值传送的D.如果输入的数据大于10,则窗体上不显示任何信息

当Form1_Click事件发生时,写出在窗体上显示的第二行和第三行是( )。 Private a As Integer,c As Integer Private Sub Form_Click() Dim a As Integer,b As Integer a=10:b=10:c=10 Print a,b,c Call test1(a,B)Print a,b,c End Sub Private Sub test1(m As Integer,ByVal n As Integer) Dim c As Integer m=5:n=5:c=5 Print m,n,c End SubA.5 5 5 5 10 10B.5 5 5 5 5 10C.5 5 10 5 10 10D.5 5 5 10 10 10

有如下函数过程: Function lj(x As Integer) As Long Dim s As Long Dim i As Integer s=0 For i = 1 To x s=s+ i Next i 1j= s End Function在窗体上添加一个命令按钮,名为Command1, 编写事件过程调用该函数: Private Sub Command1 Click() Dim i As Integer Dim sum As Long For i = 1 To 5 sum = sum + 1j(i) Next i Print sum End SubA. 25B.35C.45D.55

在窗体上画一个名称为CoilTlilandl的命令按钮,然后编写如下事件过程: Private Sub command1 Click() Dim m As Integer, i As Integer, x(3)As Integer For i=0 To 3:x(i)=i:Next i For i = 1 To 2: Call sub1(x,i):Next i For i = 0 To 3: Print x(i);: Next i End Sub Private Sub sub1(a()As Integer,k As Integer) Dim i As Integer Do a(k)=a(k)+a(k+1) j = j + 1 Loop While j < 2 End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.0 3 7 5B.0 1 2 3C.3 2 4 5D.0 5 8 3

Private Sub Commandl Click()Dim i As Integer, j As IntegerDim a (10,10)As IntegerFor i=1 To 3For j= i To 3a(i,j)=(i-1)*3+jPrint a (i,j);Next jPrintNext iEnd Sub程序运行后,单击命令按钮,窗体上显示的是( )。

在窗体上画一个名称为Labell的标签,然后编写如下事件过程。 Private Sub Form_Click( ) Dim arr(10, I0) As Integer Dim i As Integer, j As Integer For i = 2 To 4 For j =2 To 4 arr(i,j) =i*j Next Next Labell. Caption = Str(arr(2,2) + arr(3,3) ) End Sub 程序运行后,单击窗体,在标签中显示的内容是A.12B.13C.14D.15

当Form_Click;事件发生时,窗体上显示的第三行是 ______。 Private Sub Form_Click() Dim i As Integer, j As Integer, k As Integer Dim x(5, 5) As Integer For i = 1 To 5 k = 1 For j = 1 To 5 If i <= j Then x(i, j) = k + 1 k=k+2 Else x(i, j) = k + 1 End If Next j Next i For i = 1 To 5 For j = 1 To 5 Print x(i, j) Next j Print Next i End SubA.22135B.21357C.22213D.13579

在窗体上绘制一个名称为Labell的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i=2 To 4 For j=2 To 4 arr(i,j)=i*j Next i Next i Labell.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是A.12B.13C.14D.15

程序代码如下,当单击窗体上的Command1控件时,在窗体上输出的结果是( )。 Private Sub Command1_Click() Dim aa(3,3)As Integer Dim i As Integer,j As Integer Dim s As Integer For i=0 To 3 For j=0 To 3 aa(i,j)=i*4+j+1 Next j Next i For i=0 To 3 s=s+aa(i,1) Next i Print s End SubA.32B.28C.30D.36

编写如下事件过程: Option Base 1 Private Sub Form Click() Dim x1()As Integer Dim i As Integer Dim s As Integer ReDim x1(3) For i = 1 To UBound(x1) x1(i)=i + 1 Next i Call sub1(x1) For i = 1 To UBound(x1) s = s + x1(i) Next i Print s End Sub Private Sub sub1(n()As Integer) Dim i As Integer ReDim Preserve n(5) For i = 3 To 5 n(i)=n(i-1)*2 Next i End Sub 程序运行后,单击窗体,则窗体上显示的内容是A.6B.12C.24D.47

在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim n As Integer For n = 0 To 9 Step 3 Print rel(n); Next n End Sub Private Function rel(ByVal i As Integer)As Integer Dim x As Integer x = 0 For j = 1 To i If i < 5 Then rel = i: EXit Function x = x + i Next i rel = x End Function 程序运行后,单击命令按钮,则窗体上显示的内容是A.1 3 5 7B.2 8 14 53C.0 3 21 45D.0 5 11 34

设有如下程序: Private Sub Form. Click( ) Dim ary(1 To 5)As Integer Dim i As Integer Dim sum As Integer For i=1 To 5 ary(i)=i+l sum=sum+ary(i) Next i Print sum End Sub 程序运行后,单击窗体,则在窗体上显示的是( )。A.15B.16C.20D.25

在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Function fun(x As Integer,y As Integer) Static m As Integer Static i As Integer i=i+2 i=i+m+1 m=i+x+y fun=m End Function Private Sub Command1_Click() Dim j As Integer,m As Integer,k As Integer j=4:m=1 k=fun(j,m) Print k; k=fun (j,m) Print k End SubA.8 18B.7 17C.7 19D.8 19

在窗体上画一个名称为Connand1的命令按钮,然后编写如下程序: Private Sub Command1_Click() Dim i As Integer, j As Integer Dim a(10, 10) As Integer For i = 1 To 3 For j = 1 To 3 a(i, j) = (i - 1) * 3 + j Print a(i, j); Next j Print Next i End Sub程序运行后,单击命令按钮,窗体上显示的是______。A.1 2 3 2 4 6 3 6 9B.2 3 4 3 4 5 4 5 6C.1 4 7 2 5 8 3 6 9D.1 2 3 4 5 6 7 8 9

程序代码如下,当单击窗体上的Command1控件时,窗体上输出的结果是( )。 Private Sub Command1_Click() Dim Y As Integer,I As Integer Dim A(7)As Integer Y=18:I=0 Do A(I)=Y Mod 2 I=I+1 Y=Y\2 Loop Until Y<1 For j=I-1 To 0 Step-1 Print A(j); Next j End SubA.1 0 0 0B.1 0 0 1 0C.0 0 1 1 0D.1 0 1 0 0

下列程序段的执行结果为______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim x As Integer For i=1 To 3 m(i,i)=i Next For i=0 T0 3 For j=0 To 3 x=x+m(i, j) Next Next Print xA.3B.4C.5D.6

当发生Form_Click事件时,窗体上显示的第三行是( )。 Option Base 1 Private Sub Form_Click() Dim i As Integer,j As Integer,k As Integer Dim a(5,5)As Integer For i=1 To 5 k=1 For i=1 To 5 If(i<=j)Then a(i,j)=k k=k+2 Else a(i,j)=k+1 End If Next j Next i For i=1 To 5 For j=1 To 5 Print a(i,j); Next j Print Next i End SubA.1 3 5 7 9B.2 1 3 5 7C.2 2 2 1 3D.2 2 1 3 5

执行下面的程序,窗体上第二行显示的内容是()。 Dim a(3,3)As Integer,i As Integer,j As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*2+j Print a(i,j); Nextj Print Next iA、123B、567C、345D、456