假定有以下程序段: 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
假定有以下程序段: For i= 1 To 4 For j=5 To 1 Step-1 Print i*j Next j, Next i 则语句Print i*j的执行次数是
A.20
B.16
C.17
D.18
相关考题:
假设有下列程序段:For i=1 To 3For j=5 To 1 Step-1Print i*iNext jNext 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循环执行的次数分别是【 】。
有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
有下面的程序段,其功能是按图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
( 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,被执行多少次? int i,j=0; for(i=0;i<10;i++) { for(j=0;j<=100;j++) { 语句1; } i++; }A.1000B.1010C.1100D.1210
下面程序段中,语句1,被执行多少次? int i,j=0; for(i=0;i<10;i++) { for(j=0;j<100;j++) { 语句1; } i++; }A.1000B.1100C.1210D.1010
【填空题】下面的程序段执行时,语句m=i+j执行的次数是多少?__________.m的最终值是多少?_______. { int i,j,m,k=0; for(i=1;i<=5;i++) for(j=5;j>=-5;j=j-2) { m=i+j; k=k+1; } printf("%d,%d",k,m); }