下列程序段的执行结果为()。 i = 4: a = 5 Do i = i + 1 a = a + 3 Loop Until i >= 9 Print i; aA.9 20B.10 20C.10 23D.9 23
下列程序段的执行结果为()。 i = 4: a = 5 Do i = i + 1 a = a + 3 Loop Until i >= 9 Print i; a
A.9 20
B.10 20
C.10 23
D.9 23
参考答案和解析
9 20
相关考题:
下列程序段的执行结果为I=1x=5DoI=I + 1x=x + 2Loop Until I =7Print "I="; IPrint "x="; x ( )。A.I=4x=5B.I=7x=15C.I=6x=8D.I=7x=17
以上程序段运行的结果是:______. 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.35D.8
下列程序段的执行结果为( )。 I=4 x=5 Do I=I+1 x=x+2 Loop Until I>=7 Print"I=";I Print"x=";xA.I=4 x=5B.I=7 x=15C.I=6 x=8D.I=7 x=11
(12)下列程序段的运行结果是 Sub sele() Dim n As Integer I=21:n=3 Do While in I=i-n Loop Print i End SubA.2 B.4 C.5 D.3
下列程序段的执行结果为______。 I= 4 a= 5 Do I=I+1 a=a+2 Loop Until I>=7 Print“I=”;I Print“A=”;aA.I=4 A=5B.I=7 A=13C.I=8 A=7D.I=7 A=11
以下能够正确计算n!的程序是A.Private Sub Command1 Click() n=5:x=1 Do x=x * I I=I + 1 Loop While I < n Print x End SubB.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End SubC.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End SubD.Private Sub Command1_Click() n=5:X=1:I=1 Do x=x * I I=I + 1 Loop While I>n Print X End Sub
下列程序共执行了______次循环。Private Sub Command1_ Click () Dim intsum As Integer Dim i AS Integer Dim j As Integer i = 1 j = 1 do do intsum = intsum + j =j+2 Print j; Loop until j >3 i = i+1 Loop until i>17 Print Print intsumEnd SubA.14B.15C.14D.13
下列程序段的执行结果为 I=1 x=5 Do I= I + 1 x= x + 2 Loop Until I>=7 Print " I= ";I Print "x=";xA.I=4 x=5B.I=7 x=15C.I=6 x=8D.I=7 x=17
下列程序段的执行结果为( )。 a=75 If a>60 Then i=1 If a>70 Then i=2 If a>80 Then i=3 If a<90 Then i=4 Print "i=";iA.i=1B.i=2C.i=3D.i=4
下列程序段的运行结果是( )。 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
下列程序段的执行结果是______。 i=4 j:5 Do i=i+1 j=j+2 Loop Until i >= 7 Print “j=”; jA.j=10B.j=11C.j=12D.j=13
下列程序段的执行结果为 i=9 x=5 Do i=i + 1 x=x + 2 Loop Until i>=7 Print "i=":i Print "x=":XA.i=4x=5B.i=7x=15C.i=6x=8D.i=10x=7
若s、i均为整型变量,执行下列程序段后s的值为 ______。s=0i=1Dos=s+ii=i+1Loop Until i>5@答案@15@[评析]@本题考查了Do...Loop Until控制语句。每执行一次循环,变量s加一次变量i,随后变量i再加一次1,直到变量5大于5时终止循环。i的初始值为1,故Do循环执行5次。相应的,变量s分别加1、2、3、4、5,故答案为15。
下列程序段的运行结果是( )。 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
以下能够正确计算n!的程序是______。A.Private Sub Commeadl_Click() n=5: x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop Whilei<=n Print x End SubD.Private Sub Commsndl_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
下列程序段的执行结果为 I=4 x=5 Do I=I + 1 X=K^2 Loop Until I>=7 Print"I=";I Print"x=";xA.I=4 x=258694B.I=7 x=256987C.I=6 x=365840D.I=7 x=390625
下列程序段的执行结果为 I=9 X=5 Do I=I+1 x=x+2 Loop Until I >=7 Print"I=";I Print"x=";xA.I=4x=5B.I=7x=15C.I=6x=8D.I=10x=7
以下程序段运行的结果是______。 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.35D.8
下列循环能正常结束循环的是()。A、i=5:Do:i=i+1:Loop Until i<0B、i=1:Doi=i+2:Loop Until i=10C、i=10:Doi=i+1:Loop Until i>10D、i=6:Doi=i-2:Loop Until i=1
下列程序中,第一个Do语句共执行了()次循环。 Dim i As Integer, j As Integer i = 1 Do j = 1 Do Sum = Sum + j j = j + 2 Print j; Loop Until j 3 i = i + 2 Loop Until i 10 Print SumA、10B、20C、5D、7
单选题下列程序中,第一个Do语句共执行了()次循环。 Dim i As Integer, j As Integer i = 1 Do j = 1 Do Sum = Sum + j j = j + 2 Print j; Loop Until j 3 i = i + 2 Loop Until i 10 Print SumA10B20C5D7
单选题下列循环能正常结束循环的是()。Ai=5:Do:i=i+1:Loop Until i<0Bi=1:Doi=i+2:Loop Until i=10Ci=10:Doi=i+1:Loop Until i>10Di=6:Doi=i-2:Loop Until i=1