网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
21、以下代码中最后显示的 i 的值是多少? j = i = 1 i += j + j * 5 print("What is i?", i)
A.0
B.1
C.5
D.6
E.7
参考答案和解析
11
更多 “21、以下代码中最后显示的 i 的值是多少? j = i = 1 i += j + j * 5 print("What is i?", i)A.0B.1C.5D.6E.7” 相关考题
考题
假设有下列程序段:For i=1 To 3For j=5 To 1 Step-1Print i*iNext jNext i则语句Print i*j的执行次数是______,i的值为______,j的值为______。
考题
以下程序的输出结果是 ( ) main( ) { int n[3] [3],i,j; for (i=0;i<3;i+ +) for(j=0;i<3;++) n[i][j]=i+j; for(i=0;i<2;i++) for(j=0,j<2;j++) n[i+1][j+1]+=[i][j]; printf("%d\n",n[1][j]); }A.14B.0C.6D.值不确定
考题
以下程序的输出结果是 ______。 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.值不确定
考题
给定下面的代码: int i=1,j=10; do { if(i++>--j) continue; }while(i<5) 执行完之后,i与j的值分别是多少? ( )A.i=6,j=5B.i=5,j=5C.i=6,j=4D.i=5,j=6
考题
(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的值为______。
考题
请阅读下面程序public class Test {public static void main (String[] args) {int i,j;for (i=1;i<5;i++) {for (j=1;j<=i;j++)system.out.print (i+"X"+j+"="+i*j+" ");System.out.println();}}}程序执行完后,i循环和j循环执行的次数分别是【 】。
考题
在执行完此程序段后,i,j值为 int i=1,j=10; do{ if(++i>j--)continue; }while(i<5);A.i=6 and j=5B.i=5 and j=5C.i=6 and j=4D.i=5 and j=6
考题
有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
考题
假定有下列程序段 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
考题
当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
考题
假定有以下程序段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
考题
有下面的程序段,其功能是按图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
考题
假定有以下程序段: For i= 1 To 4 For j=5 To 1 Step-1 Print i*j Next j, Next i 则语句Print i*j的执行次数是A.20B.16C.17D.18
考题
程序执行完这条语句后int i=1,j=1;i2+j;i的值是多少?A.1B.2C.8SXB
程序执行完这条语句后int i=1,j=1;i2+j;i的值是多少?A.1B.2C.8D.3
考题
( 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
考题
有下面的程序段,其功能是按图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
考题
当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
考题
当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
考题
当发生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
考题
int i = 1,j = 10; do{ if (ij) { continue; } j--; } while (++i 6); System.out.println(“i = “ +i+” and j = “+j); What is the result?() A、 i = 6 and j = 5B、 i = 5 and j = 5C、 i = 6 and j = 4D、 i = 5 and j = 6E、 i = 6 and j = 6
考题
int i = 0, j = 5; tp; for (;;) { i++; for(;;) { if (i --j) { break tp; break tp; } } System.out.println(“i=” +i “,j =”+j); } What is the result?() A、 i = 1, j = 0B、 i = 1, j = 4C、 i = 3, j = 4D、 i = 3, j = 0E、 Compilation fails.
考题
int i = 0, j = 1; if ((i++ == 1) (j++ == 2)) { i = 42; } System.out.println(“i = “ + i + “, j = “ + j); What is the result?() A、 i = 1, j = 2B、 i = 1, j = 1C、 i = 42, j = 2D、 i = 42, j = 1E、 Compilation fails.
考题
int i= 1, j= 10 ; do ( if (i++ --j) continue; ) while (i5); After execution, what are the values for I and j?() A、 i = 6 and j= 5B、 i = 5 and j= 5C、 i = 6 and j= 4D、 i = 5 and j= 6E、 i = 6 and j= 6
考题
下列代码段inti=1,j=10;do{???if(i++--j)continue;}while(i5);执行完毕后,i和j的值分别是()。A、i=6?j=5B、i=5?j=5C、i=6?j=4D、i=5?j=6
考题
int i = 1,j = 10; do { if(ij) { break; } j--; } while (++i 5); System.out.println(“i =” +i+” and j = “+j); What is the result?()A、 i = 6 and j = 5B、 i = 5 and j = 5C、 i = 6 and j = 4D、 i = 5 and j = 6E、 i = 6 and j = 6
考题
单选题int i= 1, j= 10 ; do ( if (i++ --j) continue; ) while (i5); After execution, what are the values for I and j? ()A
i = 6 and j= 5B
i = 5 and j= 5C
i = 6 and j= 4D
i = 5 and j= 6E
i = 6 and j= 6
考题
单选题int i = 1,j = 10; do{ if (ij) { continue; } j--; } while (++i 6); System.out.println(“i = “ +i+” and j = “+j); What is the result?()A
i = 6 and j = 5B
i = 5 and j = 5C
i = 6 and j = 4D
i = 5 and j = 6E
i = 6 and j = 6
考题
单选题int i = 1,j = 10; do { if(ij) { break; } j--; } while (++i 5); System.out.println(“i =” +i+” and j = “+j); What is the result?()A
i = 6 and j = 5B
i = 5 and j = 5C
i = 6 and j = 4D
i = 5 and j = 6E
i = 6 and j = 6
热门标签
最新试卷