有如下程序; Private SubForm_Click() Dim check As Boolean,n As Integer check=False n=0 Do Do While n<10 n=n+1 If n=5 Then check=True Exit Do End if Print n; Loop Loop Until check = True End Sub 程序运行后,输出的结果是 ______ 。
A.1 2 3
B.1 2 3 4
C.1 2 3 4 5
D.1 2 3 4 5 6
第1题:
有如下程序: Private Sub Form Click() Dim Check,Counter Check=True Counter=0 Do Do While Counter<20 Counter=Counter+1 If Counter=10 Then Check=False Exit Do End If Loop Loop Until Check=False Print Counter,Check End Sub 程序运行后,单击窗体,输出结果为
A.15 0
B.20 -1
C.10 Tree
D.10 False
第2题:
当发生窗体的单击事件时,输出的第二行为( )。 Private Sub Form_click() Dim N1 As Integer,N2 As Integer,N3 As Integer N1=1:N2=1 Print N1;N2 Do N3=N1+N2 Print N3; N1=N2:N2=N3 Loop Until N3>=5 End Sub
A.1 1 1
B.2 3 5
C.2 5 7
D.2 3 4
第3题:
有如下程序 Private Sub Command1_Chck( ) s=0 DO s=(s+1) *(s+2) N=N+1 Loop Until s>=10 Prim N;s End Sub 运行后的输出结果是
A.0 1
B.30 30
C.4 30
D.2 12
第4题:
下列程序段的运行结果是( )。 Subsele() Dim n As Integer i=21:n=3 Do While i>n i=i-n Loop Print i End Sub
A.2
B.4
C.5
D.3
第5题:
假定有如下事件过程: Privte Sub Form_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是
A.81 4
B.56 3
C.28 1
D.243 5
第6题:
有如下程序: Private Sub Command1_Click() s = 0 Do s=(s+1) ( (s+2) N=N+1 Loop Until s>=10 Print N;s End Sub 运行后的输出结果是
A.0 1
B.30 30
C.4 30
D.2 12
第7题:
有如下程序: Private Sub Form_C1ick() Dim CheCk,Counter CheCk=True Counter=0 Do Do While Counter<20 Counter=Counter+1 If Counter=10 Then Check=False Exit Do End If Loop Loop Until Check=False Ptint Counter,Check End Sub 程序运行后,单击窗体,输出结果为______。
A. 15 0
B.20 -1
C.10 Tree
D.10 False
第8题:
以下程序段中Do...Loop循环执行的次数为( )。 n=5 Do lf n Mod 2=0 Then n=n\2 Else n=n*3+1 End If Loop untiln=1
A.4
B.3
C.5
D.2
第9题:
单击命令按钮时,下列程序代码的执行结果为______ 。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 Sub
A. 2
B.4
C.6
D.8
第10题:
以下程序段中Do...Loop循环执行的次数为______。 n=5 Do if n mod 2=0 then n=n\2 else n=n*3+1 end if Loop until n=1
A.4
B.3
C.5
D.2
第11题:
有如下程序: Ptivate Sub Form_Click() Dim Check,Counter Cbeck=True Counter=0 Do Do While Counter<20 Counter=Counter+1 If Counter=10 Then Check=False Exit Do End If Loop Loop Until Check=False Print Counter, Check End Sub 程序运行后,单击窗体,输出结果为______。
A.15 0
B.20 -1
C.10 True
D.10 False
第12题:
单击命令按钮时,下列程序代码的执行结果为 Private Sub Command1_Click( ) Print MyFunc(24,18) End Sub Public Function MyFunc(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 My Func=m End Function
A.2
B.4
C.6
D.8
第13题:
下列程序的运行结果是( )。 Private Function myfun(m,n) Do while m>n Do While m>n:m=m-n:Loop Do Wllile n>m:n=n-m:Loop Loop myfun=m End Function Private Sub Command1_Click( ) print myfun(9,8) End Sub
A.2
B.1
C.4
D.3
第14题:
阅读下面的程序: Private Sub Form_Click() Dim Check, Counter Check=True Counter=0 Do Do While Counter < 20 Counter=Counter + 1 If Counter=10 Then Check = False Exit Do End If Loop Loop Until Check = False Print Counter, Check End Sub 程序运行后,单击窗体,输出的结果为
A.15 0
B.20 -1
C.10 True
D.10 False
第15题:
单击命令按钮时,下列程序代码的运行结果为 Private Sub Command1_Click() Print MyFunc(20, 18) End Sub Public Function MyFunc(m As Integer, n As Integer)As Integer Do While m<>n Do While m>n:m=m-n:Loop Do Whle m<n:n=n-m:Loop Loop MyFunc=m End Function
A.0
B.2
C.4
D.6
第16题:
单击命令按钮时,下列程序的运行结果为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 Function
A.0
B.1
C.3
D.5
第17题:
单击命令按钮时,下列程序代码的运行结果为 Private Sub Command1_Click() print MyFunc(20,18) End Sub Public Function MyFunc (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=m End FunCtion
A.0
B.2
C.4
D.6
第18题:
给出下面的程序:Private Sub Command1_ Click() Dim Check, Counter Check= True: Counter = 0 do do while Counter < 20 Counter = Counter +1 if Counter = 10 then Check=False exit do End if Loop Loop until Check=False MsgBox CounterEnd Sub 程序最后弹出的消息对话框的内容是______。
A.True
B.False
C.20
D.10
第19题:
假定有如下事件过程: Private Sub Form. Click() Dim x As Integer, n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x, n End Sub 程序运行后,单击窗体,输出结果是______。
A.81 4
B.56 3
C.28 1
D.243 5
第20题:
单击命令按钮时,下列程序的运行结果为 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 Function
A.0
B.1
C.3
D.5
第21题:
下列程序的运行结果是( )。 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 Sub
A.2
B.1
C.4
D.3
第22题:
假定有如下事件过程: Private Sub Form_Cilck() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 X=X*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果为______。
A.81 4
B.56 3
C.28 1
D.243 5
第23题:
单击命令按钮时,下列程序的运行结果为 Private Sub Command1_Click( ) Print MyFund(20,18) End Sub Public Function MyFund(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 MyFund=m End Function
A.0
B.2
C.4
D.6