单项选择题

下列程序的运行结果是( )。
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 Comrnand1 Click()
print myfun(9, 8)
End Sub

A.2
B.1
C.4
D.3
<上一题 目录 下一题>
热门 试题

单项选择题
单击命令按钮时,下列程度段的执行结果是( )。 Private Sub Command1 Click() Dim a AS Integer, b As Integer, C AS Integer a=2:b=4:c=6 Call S1(a,b) Print a= ; a; b= ; b; c= ; C Call S2(a,b) Print a = ; a; b= ; b; c= ; c; End Sub Private Sub S 1(x As Integer, Y As Integer) Dim CAs Integer x=2 * x:y=y+2:c=x+y End Sub Sub S2(x As Integer, ByVal Y As Integer) Dim eAs Integer x=2 * x:Y=Y+2:e=x+y End Sub
A.a=4 b=6 c=6
a=4 b=6 c=6
B.a=8 b=6 c=6
a=8 b=6 c=6
C.a=4 b=6 c=6
a=8 b=6 c=6
D.a=8 b=6 c=6
a=4 b=6 c=6
单项选择题
在窗体上画一个命令按钮,其名称为Command1。程序运行后,单击命令按钮,输出结果是( )。 Private Sub p1 (n As Integer) For i=n To 1 Step=1 x=String(i, * ) Print x Next i End Sub Private Sub Command1_Click() p1(3) End Sub
A.***
**
*
B.***
***
C.*
*
*
D.******
相关试题
  • 下列事件过程的功能是:建立一个名为Data1...