下列程序段的执行结果为()。 A = 2: B = 1 Do A = A + B B = B + 1 Loop While A < 5 Print A, BA.8 4B.5 3C.8 3D.5 4

下列程序段的执行结果为()。 A = 2: B = 1 Do A = A + B B = B + 1 Loop While A < 5 Print A, B

A.8 4

B.5 3

C.8 3

D.5 4


参考答案和解析
A

相关考题:

下列各种形式的循环中,输出“*”的个数最少的循环是A.a=5:b=8 Do Print "*" a=a+1 Loop While a<bB.a=5:b=8 Do Print "*" a=a+1 Loop Until a<bC.a=5:b=8 Do Until a-b Print "*" b=b+1 LoopD.a=5:b=8 Do Until a>b Print "*" a=a+1 Loop

下列程序段的执行结果为m=2n=3Dom=m + nn=n + 1Loop While m 10Print m; n( )。A.1 5B.14 6C.a bD.10 25

在VB程序中有以下程序段,语句Print "VB"的执行次数是( )i=1Do While i 在VB程序中有以下程序段,语句Print "VB"的执行次数是( )i=1Do While iPrint "VB"LoopA.0B.1C.2D.无数

下列程序段的执行结果为( )。 a=1 b=5 Do a=a+b b=b+1 Loop While a<10 Printa;bA.115B.127C.abD.1025

下列程序段的输出结果为______。Check = True: a = 1Doa = a + 1Check = Check + 1Loop While a < 10print Check

单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click() Print Fun(23,18) End Sub Public Function Fun(m As Integer,n As Integer)As Integer Do While m<>n Do While m>n:m=m-n:Loop Do While m<n:n=n-m:Loop Loop Fun=m End FunctionA.0B.1C.3D.5

下列程序段的执行结果为 m=2 n=3 Do m=m+n n=n+1 Loop While m<10 Print m;nA.1 5B.14 6C.a bD.10 25

(12)下列程序段的执行结果是。 i=4 a=5 Do i=i+1 a=a+2 Loop Until i=7 Print"A=";a

(25)下列程序的运行结果是 。 Private Function myfun(m,n) Do While mn Do While mn:m=m-n:Loop Do While nm:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9,8) End SubA.2 B.1 C.4 D.3

有如下程序,该程序的执行结果为______。 Dim k As Integer n=5 m=1 k=1 Do While k <= n m=m*2 k=k+1 Loop Print mA.1B.5C.32D.40

下列程序的运行结果是( )。 Private Function myfun(m,n) Do while mn Do While mn:m=m-n:Loop Do Wllile nm:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click( ) print myfun(9,8) End SubA.2B.1C.4D.3

下列程序段的执行结果为 A=0: B=1 Do A=A+B B=B+1 Loop While A<10 Print A;BA.105B.A BC.01D.10 30

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

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

下列程序段的执行结果为 m=2 n=3 Do m=m+n n=n + 1 Loop While m<10 Print m;nA.1 5B.14 6C.a bD.10 25

有如下的程序段,该程序段执行完后,共执行的循环次数是 total=0 Counter=1 Do Print Counter total=total * Counter + 1 Print total Counter=Counter +1 If total > 10 Then Exit Do End If Loop While Counter<=10A.4B.10C.15D.20

单击命令按钮时,下列程序的运行结果为Private Sub Command1_Click( ) Print MyBM(23,18)End SubPublic Function MyBM(m As Integer,n As Integer)As Integer Do While m n Do While m > n:m=m - n:Loop Do While m < n:n=n - m:Loop Loop MyBM=mEnd FunctionA.0B.1C.3D.5

有如下程序段,该程序段执行完后,执行循环的次数是 total=0 Counter=1 Do Print Counter total=total + Counter Print total Counter=Counter+1 If total>10 Then Exit Do End If Loop While Counter <=10A.5B.10C.15D.20

下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; nA.10 5B.x nC.9 5D.10 6

有如下的程序段,该程序段的执行完后,共执行循环的次数是 Private Sub Command1_Click() total=0 Counter=l Do Print Counter total=total+Counter Print total Counter=Counter+1 If total>=10 Then Exit Do End If Loop While Counter<=10 End SubA.5B.10C.12D.20

下列程序段的执行结果为 a=1 b=5 Do a=a + b b=b + 1 Loop While a<10 Print a:bA.1 5B.12 7C.a bD.10 25

单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click( ) Print Fun(23, 18) End Sub Public Function Fun(m As Integer, n As Integer) As Integer Do Whilem <> n Do While m > n : m--m - n: Loop Do While m < n : n=n - m: Loop Loop Fun =m End FunctionA.0B.1C.3D.5

单击命令按钮时,下列程序代码的执行结果为______ 。Public Function MyFune(m As Integer,n As Integer) As Integer Do While m<>n Do While m>n m=m-n Loop Do While m<n n=n -m Loop Loop MyFunc=mEnd FunctionPrivate Sub Command1_Click() Print MyFunc(24, 18)End SubA. 2B.4C.6D.8

下列程序段的执行结果为 A=0:B=1 Do A=A+B B=B+1 Loop While A<10 Print A;BA.105B.ABC.01D.10 30

下列程序的运行结果是( )。 Private Function myfun(m, n) Do While m > n Do While m>n:m=m-n:Loop Do while n>m:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click() Print myfun(9, 8) End SubA.2B.1C.4D.3

下列程序段的执行结果为 a=1 b=5 Do a=a+b b=b+l Loop While a10 Print a;bA.1 5B.12 7C.a bD.10 25

下列各种形式的循环中,输出“*”的个数最少的循环是( )。A.a=5:b=8 Do Print"*" a=a+1 Loop While a<bB.a=5:b=8 Do Print"*" a=a+1 Loop Until a<bC.a=5:b=8 Do Until a-b print"*" b=b+1 LoopD.a=5:b=8 DoUntil a>b Print"*" a=a+1 Loop

有如下程序段,该程序段执行完后,共执行循环的次数是 Private Sub Command1_Click( ) Tota1=0 Counter=1 Do Print Counter Tota1=tota1+Counter Print total Counter=Counter+1 If total=10 Then Exit Do End lf Loop While Counter<=10 End SubA.5B.10C.12D.20