下列程序段的执行结果为 ______。A=0:B=0For I = -1 To -2 Step -1 For J = 1 To 2 B=B+1 Next J A=A+1Next IPrint A; BA.2 4B.-2C.4D.2

下列程序段的执行结果为 ______。A=0:B=0For I = -1 To -2 Step -1 For J = 1 To 2 B=B+1 Next J A=A+1Next IPrint A; B

A.2 4

B.-2

C.4

D.2


相关考题:

在窗体上画1个名称为Command1的命令按钮,然后编写如下事件过程:Private Sub Command1_Click()a=0For i=1 To 2For j=1 To 4If j Mod 20 Thena=a-1End Ifa=a+1Next jNext iPrint aEnd Sub程序运行后,单击命令按钮,输出结果是( )。A.0B.2C.3D.4

( 23 )在窗体上画 1 个名称为 Command1 的命令按钮,然后编写下列事件过程:Private Sub Command1_Click( )a=0For i=1 To 2For j=1 To 4If j Mod 20 Thena=a-1End Ifa=a+1Next jNext iPrint aEnd Sub程序运行后,单击命令按钮,输出结果是( )。A ) 0B ) 2C ) 3D ) 4

下列程序段的执行结果为 ______。 A=0:B=0 For I=-1 To-2 Step-1 For J=1 To 2 B=B+1 Next J A=A+1 Next I Print A;BA.2 4B.-2 2C.4 2D.2 3

阅读下列程序段:x = 0For i = 1 To 4For j = 1 To ix = x + 1Next j, i执行以上循环后,x 的值为( )。A、 6B、 9C、 10D、 16

阅读下面的程序段:a=0For i=1 To 3For j=1 To iFor k=j To 3a=a+1Next kNext jNext i执行上面的程序段后,a的值为A.3B.9C.14D.21

下列程序段的执行结果为【 】。K=0For J=1 To2For I = 1 To 3K=I+1Next IFor I=1 To7K=K+INext INext JPrint K

(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的值为______。

(24)有下列程序段,其输出结果是 a=0:b=0 For i=-1 To -2 Step -1 For j=1 To 2 b=b+1 Next j a=a+1 Next i Print a;bA.2 3 B.-2 2 C.4 2 D.2 4

下列程序段的执行结果为()。 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 K A. 6B. 10C. 11D. 16

执行下面的程序段后,变量a的值为______。a=0For i=2.7 To 5.9 Step 0.5a=a+1Next i

在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()a=0For i=1 To 3For j=1 To 4If j Mod 2<>0 Thena=a+1End Ifa=a+1Next jNext iPrint aEnd Sub程序执行后,单击命令按钮,输出结果是【 】。

下列程序段的执行结果为______。 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. 10B.6C.11D.16

有如下程序:Private Sub Command1_Click()j =10For i= -1 To 1 Step 0.3j =j + 1Next iPrint jEnd Sub该程序共循环【 】次,程序执行完毕后j的值是【 】。

以下程序用于求s=1+(1+2)+(1+2+3)+……(1+2+……100)的和,请补充完该程序。Dim n As IntegerDim i As IntegerDim j As LongDim s As Longn=100j=0s=0For i=1 To【 】J=【 】s=【 】Next iPrint s

下列程序段的执行结果为_______。 A=0:B=0 For I=-1 To -2 Step -1 For J=1 To 2 B=B+1 Next J A=A+1 Next I Print A;BA.2 4B.-2 2C.4 2D.2 3

有下列程序段,其输出结果为( )。 a=0:b=0 For i=-1 To -2 Step-1 For i=1 To 2 b=b+1 Next j a=a+1 Next i Print a;bA.2 3B.-2 2C.4 2D.2 4

执行下列的程序段后,变量a的值为______。a=0For i=2.7 To 5.9 Step 0.5a=a+1Next i

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

下列程序执行后,执行的结果是______ 。 Dim M(2) For i = 1 To 2 M(i) = 0 Next i k=2 For i = 1 To k For j = 1 To k M(j) = M(i) + 1 Print M(k): Next j Next IA.1234B.0123C.223D.2345

下列程序段的执行结果为 n=0 For i=1 To 3 For j=5 To 1 Step-1 n=n+1 Next j,i Print n;j;iA.12 0 4B.15 0 4C.12 3 1D.15 3 1

有下列程序段,其输出结果是( )。 a=0:b=0 For i=-1 To -2 Step -1 For j=1 To 2 b=b+1 Next j a=a+1 Next i Print a;bA.2 3B.-2 2C.4 2D.2 4

下列程序段的执行结果是______ 。 a=0 b=0 For i = -1 To -2 Step -1 For j = 1 To 2 b=b+1 Next j a=a+1 Next i Print a; bA. 24B.- 20C.42D.22

下列程序段的执行结果是______ 。 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

下列程序段的执行结果为_______。 N=0 For I=1 To 3 For J=5 To 1 Step -1 N=N+1 Next J Next I Print N;J;IA.12 0 4B.15 0 4C.12 3 1D.15 3 1

下列程序段的执行结果为______。N=0For I=1 To 3 For J=5 To 1 Step-1 N=N+1 Next JNext IPrint N;J;IA.12 0 4B.15 0 4C.12 3 1D.15 3 1

下列程序段的执行结果为______。 N=0 For I=1 To 3 For J=5 To 1 Step-1 N=N+1 Next J Next I Print N; J; IA.12 O 4B.15 0 4C.12 3 1D.15 3 1

有下列程序段,其输出结果为( )。 a=0:b=0 For i=-1 To-2 Step-1 For j=1 To 2 b=b+1 Next j a=a+1 Next i Print a;bA.23B.-22C.42D.24