网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
执行下列程序段,则在窗体上输出字符x的个数为()。 For i = 1 To 3 For j = i To 4 Form1.Print "x" Next j Next i
A.3
B.9
C.4
D.12
参考答案和解析
错误
更多 “执行下列程序段,则在窗体上输出字符x的个数为()。 For i = 1 To 3 For j = i To 4 Form1.Print "x" Next j Next iA.3B.9C.4D.12” 相关考题
考题
下列程序段的执行结果为 ______。 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
考题
(22)在窗体上添加一个命令按钮,名为Command1,其单击事件中有下列程序段,则事件过程执行后,文本框中输出 For i=1 To 4 For j=1 To 3 x= 3 For k=1 To 2 x=x+3 Next k Next j Next i Text1.Text=Str(x)A.3 B.6 C.9 D.12
考题
(10)假设有下列程序段: For i=1 To 3 For j=5 To 1 Step -1 Print i*j Next j Next i则语句Print i*j的执行次数是,i的值为______,j的值为______。
考题
有F面的程序段.其功能是按图1所示的规律输出数据Dim a(3,5)As IntegerFor i=1 To 3For i=1 To 5a(i,j)=i+jPrint a(i,j);NextPrintNext若要按图2所示的规律继续输出数据,则接在上述程序段后面的程序段应该是A.For i=i To 5 For j=1 To 3 Print a(j,i); Next Print NextB.For i=1 To 3 For i=1 To 5 Print a(j,i); Next Print NextC.For j=1 To 5 FOr i=1 TO 3 Print a(j,1); Next Print NextD.For i=1 To 5 For j=1 To 3 Print a(i,j); Next Print Print Next Next
考题
下列的程序段执行后,X的值为______。 K=0 For i=1 To 10 For j=i To 10 x= x + 1 Next j Next iA.50B.55C.100D.105
考题
阅读下面的程序: Private Sub Command1_Click() For i=1 To 3 For j=1 To i For k=j To 3 x=x+1 Next k Next j Next i Print x End Sub 程序运行后,单击命令按钮,窗体上输出的结果是A.3B.9C.14D.21
考题
阅读下面的程序段: For i=1 To 3 For j=1 To i For k=j To 4 a=a+1 Next k Next j Next i 执行上面的三重循环后,a的值为( )。A.9B.14C.20D.21
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下程序: Option Base 1 Private Sub Command1_Click() Dim a(3,3) For i=1 To 3 For j=1 To 3 If i=j Then a(i,j)=1 If i<j Then a(i,j)=2 If i>i Then a(i,j)=3 Next j Next i For i=1 To 3 For j=1 To 3 Print a(i,j); Next j Print Next i End Sub 程序运行后,如果单击命令按钮,则在窗体上输出的内容为 ______。A.1 3 3B.1 2 2C.2 3 3D.2 1 1 2 1 3 3 1 2 1 2 3 3 2 1 2 2 1 3 3 1 1 1 2 3 3 2
考题
有下面的程序段,其功能是按图1所示的规律输出数据: Dim a(3,5)As Integer For i=1 To 3 For j=1 To 5 a(i,j)=i+j Print a(i,j); Next Print Next若要按图2所示的规律继续输出数据,则接在上述程序段后面的程序段应该是( )。A.For i=1 To 5 For j=1 To 3 Print a(j,i); Next Print NextB.For i=1 T0 3 For j=1 To 5 Print a(j,i); Next Print NextC.For j=l To 5 For i=1 To 3 Print a(j,i); Next Print NextD.For i=1 To 5 For=1 To 3 Print a(i,j): Next Print Next
考题
在窗体上添加一个命令按钮,名为Command1,其单击事件中有如下程序段,则事件过程执行后,文本框中输出( )。 For i= 1 To 4 For j = 1 To 3 x=3 For k =1 To 2 x=x+3 Next k Next j Next i TextText = Str(x)A.3B.6C.9D.12
考题
下列程序段的输出结果为( )。 Dim M(5,5), S(5) For i = 1 To 5 S(i) = 0 For j = 1 To 5 M(i, j) = i + j S(i) = S(i) + M(i, j) Next j Next i For Each x In S Print x; Next xA.2023 24 3540B.2025 30 3540C.2023 25 35 40D.2025 354045
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x = 0 n=InputBox(" ") For i = 1 To n For j=1 To i x = x + 1 Next i Next i Print x End Sub 程序运行后,单击命令按钮,如果输入3,则在窗体上显示的内容是A.3B.4C.5D.6
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1 Click () x=0 n=InputBox ("") For i=1 TO n For j=1 To i x=x+1 Next j Next i Print x End Sub 程序运行后,单击命令按钮,如果输入3,则在窗体上显示的内容是( )。A.3B.4C.5D.6
考题
阅读如下程序: Option Base 1 Private Sub Form Click() Dim Arr(4,4)As Integer For i=1 To 4 For j=1 To 4 Arr(i,j)=(i-1)*2+j Next j Next i For i=3 To 4 For j=3 To 4 Print Arr(j,i); Next j Print Next i End Sub 程序运行后,单击窗体,输出的结果为A.5 7 6 8B.6 8 7 9C.7 9 8 10D.8 10 8 11
考题
下列程序段的执行结果为______ 。 Dim A(10,10) For I = 2 To 4 For J = 4 To 5 A(I, J) = I * J Next J Next I Print A(2, 5) + A(3, 4) + A(4, 5)A.22B.42C.32D.52
考题
在窗体上添加一个命令按钮,然后编写其单击事件过程为: For i=1 To 3 x=4 For j=1 To 4 x=3 For k=l To 2 x=x+5 Next k Next j Next i MsgBox x 则单击命令按钮后消息框的输出结果是( )。A.7B.8C.9D.13
考题
下列程序段的输出结果为( )。 Dim M(5, 5), S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i, j)=i+j S(i)=S(i)+M(i, j) Next j Next i For Each x In S Print x; Next xA.20 23 24 35 40B.20 25 30 35 40C.20 23 25 35 40D.20 25 35 40 45
考题
在窗体上添加一个命令按钮,然后编写其单击事件过程为: For i=1 To 3 x=4 For j=1 To 4 x=3 For k=1 To 2 x=x+5 Next k Next j Next i MsgBox x 则单击命令按钮后消息框的输出结果是( )。A.7B.8C.9D.13
考题
当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
考题
程序代码如下,当单击窗体上的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
考题
阅读下面的程序段: a==0 For i=1 To 3 For j=1 To i For k=j To 3 a=a+l Next k Next j Next i 执行上面的程序段后,a的值为( )。A.3B.9C.14D.21
考题
下列的程序段执行后,x的值为______。Private Sub Command1_Ciick() x =0 for i =1 To 10 for j = i To 10 x=x+1 Next j Next i Print xEnd SubA.50B.55C.5D.105
考题
下面的程序段执行后,X的结果为______。 X=0 For I=1 to 5 For j=I to 5 X=X+1 Next j Next I Print xA. 5B.10C.15D.20
考题
下列程序段的执行结果为______。 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
考题
下列程序段的执行结果为 Dim A(10, 10) For I=2 To 4 For J=4 To 5 A(I,J)=I*J Next J Next I Print A(2, 5)+ A(3, 4) + A(4, 5)A.22B.42C.32D.52
考题
下列程序段的执行结果为 ______。 Dim m(3,3)As Integer Dim i As Integer Dim j As Integer Dim K 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
考题
下列程序段的执行结果为 Dim A(10,10) For 1=2 To 4 For J=4 To 5 A(I,J)=I*J Next J Next I Print A(2,5)+A(3,4)+A(4,5)A.22B.42C.32D.52
考题
在窗体上画一个名称为Comillarldl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x=0 n=InputBox(" ") For i=1 To n For j=1 To i x=x+1 Next j Next i Print x End Sub 程序运行后,单击命令按钮,如果输入3,则在窗体上显示的内容是( )。A.3B.4C.5D.6
热门标签
最新试卷