表达式for(i <- 1 to 3; j <- 1 to 3; if i != j ) {print((10 * i + j));print(" ")}输出结果正确的是?A.11 12 13 21 22 23 31 32 33B.11 13 21 23 31 33C.12 13 21 23 31 32D.11 12 21 22 31 32

表达式for(i <- 1 to 3; j <- 1 to 3; if i != j ) {print((10 * i + j));print(" ")}输出结果正确的是?

A.11 12 13 21 22 23 31 32 33

B.11 13 21 23 31 33

C.12 13 21 23 31 32

D.11 12 21 22 31 32


参考答案和解析
正确

相关考题:

假设有下列程序段:For i=1 To 3For j=5 To 1 Step-1Print i*iNext jNext i则语句Print i*j的执行次数是______,i的值为______,j的值为______。

以下程序的输出结果是 ______。 Dim n(2,2), i, j As Integer For i = 0 To 2 For j = 0 To 2 n(i,j) = i + j Next j Next i For i = 0 To 1 For j = 0 To 1 n(i+ 1 ,j + 1) = n(i + 1,j + 1) + n(i, j) Next j Next i Print n(i, j)A.14B.0C.6D.值不确定

设有命令按钮Command1的单击事件过程,代码如下: Private Sub Command1 Click() Dim a(3,3)As Integer For i=1 To 3 For j=1 To 3 a(i,j)=i*j+i Next j Next i Sum=0 For i=1 To 3 Sum=Sum+a(i,4-i) Next i Print Sum End Sub 运行程序,单击命令按钮,输出结果是______。A.20B.7C.16D.17

在窗体上面一个命令按钮(其Name属性为Command1),然后编写如下代码: Option Base 1 Private Sub Command1_Click() Dim a(4,4) For i=1 To 4 For j=1 To 4 a(i,j)=(i-1)*3+j Next j Next i For i=3 To 4 For j =3 To 4 Print a(j,i); Next j Print Next i End Sub程序运行后,单击命令按钮,其输出结果为______ 。A.6 9 7 10B.7 10 8 11C.8 11 9 12D.9 12 10 13

(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

在窗体上画—个命令按钮(其名称为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.没有输出

假定有下列程序段 For i=1 TO 3 For j=5 TO 1 Step-1 Print i*j Next j Next i 则语句Print i*j的执行次数是( )。A.15B.16C.17D.18

下列程序共执行了______次循环。Private Sub Command1_ Click () Dim intsum As Integer Dim i AS Integer Dim j As Integer i = 1 j = 1 do do intsum = intsum + j =j+2 Print j; Loop until j >3 i = i+1 Loop until i>17 Print Print intsumEnd SubA.14B.15C.14D.13

以下程序的输出结果是( )。 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

下列程序段的执行的结果是 Dim a(10),b(10) i=3 For j=1 To 5 a(j) =j b(i) =2 * i + j Next j Print b(i);a(i)A.11 3B.3 15C.3 11D.15 3

假定有以下程序段For i=1 To 3 For j=5 To 1 Srep-1 Print i*j Next jNext i则语句Print i*j 的执行次数是______。A.15B.16C.17D.18

在窗体上画一个名称为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

请阅读程序: Private Sub Form. Click( ) m=1 For i=4To 1 Step-1 Print Str(m);m=m+1 For j=1 To i Print"*": Next j Print Next i End Sub 程序运行后,单击窗体,则输出结果是( )。A.1**** 2*** 3** 4*B.4**** 3*** 2** 1*C.**** *** ** *D.* ** *** ****

下列程序段的执行结果是______。 i=0 For j = 10 To 19 Step 3 i=i+1 Next j Print IA.4B.5C.3D.6

下列程序段的执行结果是______。 i=4 j:5 Do i=i+1 j=j+2 Loop Until i >= 7 Print “j=”; jA.j=10B.j=11C.j=12D.j=13

下列程序段执行后,执行的结果是______ 。 Dim M(10) Dim N(10) i=3 For j = 1 To 5 M(j) = j N(i) = 2 * i + j Next j Print N(i); M(i)A.12 4B.11 3C.3 11D.10 2

( 23 )有下面的程序段,其功能是按图 1 所示的规律输出数据Dim a ( 3 , 5 ) As IntegerFor i=1 To 3For j=1 To 5A ( i,j ) =i+jPrint a ( i,j ) ;NextPrintNext若要按图 2 所示的规律继续输出数据,则接在上述程序段后面的程序段应该是A )For i=1 To 5For j=1 To 3Print a ( j,i ) ;NextPrintNextB )For i=1 To 3For j=1 To 5Print a ( j,i ) ;NextPrintNextC )For j=1 To 5For i=1 To 3Print a ( j,i ) ;NextPrintNextD )For i=1 To 5For j=1 To 3Print a ( i,j ) ;NextPrintNext

下列程序的输出结果是 classA{ int i,j; A(int i,int j) { this.i=i; this.j=j; } void print( ) { System.out.println("i="+i+""+"j="+j) } class B extends A{ int in; B (int i,int j,int m){ super(a,B) ; this.m=m; } void print( ) { Sytem.out.println("m+"+m);} } class C { public static void main (strang argsⅡ) { B b:new B(1,2,3); b.print( ); } }A.i=1 j=2 m=3B.m=3C.i=3 j=2D.m=1 i=1

有下面的程序段,其功能是按图1所示的规律输出数据:Dim a(3,5)As Integer For i=1 To 3For j=1 To 5a(i,j)=i+jPrint a(i,j);NextPrintNext若要按图2所示的规律继续输出数据,则接在上述程序段后面的程序段应该是( )。A.For i=1 To 5For j=1 To 3Print a(j,i);NextPrintNextB.For i=1 T0 3For j=1 To 5Print a(j,i);NextPrint NextC.For j=l To 5For i=1 To 3Print a(j,i);NextPrintNextD.For i=1 To 5For=1 To 3Print a(i,j):NextPrintNext

阅读如下程序: 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

下列程序段的执行结果是______ 。 k=0 For j=1 To 2 For i=1 To 3 k = i+ 1 Next i For i=1 To 7 k= k + 1 Next i Next j Print kA. 11B.10C.9D.8

请阅读程序. 0ption Base 1 Private Sub Fo,m 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

程序代码如下,当单击窗体上的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

下面程序段的运行结果是( )。 Private Sub Form_Click() For I=3 to 1 step-1 Print Spc(10-I); For j=1 to 2*I-1 print"*"; Next j Print Next I End SubA.***** *** *B.* *** *****C. * *** *****D. * *** *****

以下程序的输出结果是( )。 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

表达式for(i-1to3;for(j-1to3;ifi!=j)print((10*i+j))+""输出结果正确的是?()A、11;12;13;21;22;23;31;32;33B、11;13;21;23;31;33C、12;13;21;23;31;32D、11;12;21;22;31;32