D.im a(3) As Integer, b(3) As Integer
F.or k = 0 To 3
a(k) = k*k +k
b(k) = a(k)-k
Next k
Print a(2) + b(1)
A. 5
B. 6
C. 7
D. 8
[单选题]下列程序段的运行结果是( )。Sub sele()D.im n As Integeri=21:n=3D.o While i>ni=i-nLoopPrint iE.nd SubA.2B.4C.5D.3
[单选题]下列程序段的运行结果是( )。 Subsele() Dim n As Integer i=21:n=3 Do While i>n i=i-n Loop Print i End SubA.2B.4C.5D.3
[单选题]以下程序段的执行结果是 ______。 Dim a As Integer,b As Integer For a=4 To 1 Step-1 b=b+a Next a Print b, aA.100B.9 1C.10 1D.90
[单选题]下列程序段的运行结果是( )。 Sub sele() Dim n As Integer i=21: n=3 Do While i > n i=i-n Loop Print i End SubA.2B.4C.5D.3
[试题]下面程序段运行后,变量x的值为上 [ ] 。D.im x As IntegerD.im i As Integerx=Ofor i=0 to 50 step 10X=X+inext i
[单选题]以下程序段运行的结果是______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+l If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print jA.20B.7C.35
[单选题]以下程序段运行的结果是 ______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print jA.20B.7C.3
[单选题]以下程序段运行的结果是______。 Dim a(~1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print jA.20B.7C.35
[单选题]以下程序段运行的结果是______。Dim a(-1 To 5) As BooleanDim flag As Booleanflag = FalseDim i As IntegerDim j As IntegerDo Until flag = True For i=-1 To 5 j=j+1 If a(i)= False Then a(i)= True Exit For End If If i = 5 Then flag = True End If NextLoopPrint jA.20B.7C
[单选题]以下程序段运行的结果是: ______。 Dim a(-1 To 5)As Boolean Dim flag As Boolean flag=False Dim i As Integer Dim j As Integer Do Until flag=True For i=-1 To 5 j=j+1 If a(i)=False Then a(i)=True Exit For End If If i=5 Then flag=True End If Next Loop Print jA.20B.7C.