运行下列程序段,其中语句“n = n + 1”被执行的次数是()。 Dim m%... 1 Print n Next Next
举一反三
- 有如下程序: Dim a(3,3)As Integer For m = 1 To 3 For n = 1 To 3 a(m,n)=(m-1)*3+n Next n Next m For m = 2 To 3 For n = 1 To 2 Print a(n,m); Next n Next m 运行后,输出结果是( )。
- 下列程序段的执行结果为_____。 Dim M(10),N(10) I=3 for T=1 To 5 M(T)=T N(I)=2*I+T Next T print N(I);M(I)
- 下列程序段的执行结果为________。 Dim M(10), N(10) i= 4 For j = 1 To 7 M(j) = j N(i) = 2 * i + j Next j Print N(i); M(i)
- 下面____程序段不能正确显示1!、2!、3!、4!的值。 A: For I=1 To 4 n=1 For j=1 to I n=n*j Next j Print n Next I B: For I=1 To 4 For j=1 to I n=1 n=n*j Next j Print n Next I C: n=1 For j=1 to 4 n=n*j Print n Next j D: n=1:j=1 Do While j<=4 n=n*j Print n j=j+1Loop
- 下列程序段的执行结果为_______。 M=0 For I=1 To 3 For J =5 To 1 Step-1 N = N+1 Next J,I Print N;J;I