单项选择题
在窗体上画一个命令按钮,然后编写如下程序
Private Sub Command1_Click( )
Dim a As Integer,b As hiteger
a=1
b=2
Print N(a,b)
End Sub
Function N(x As Integer,y As Integer)As Integer
N=IIf(x>y,x,y)
End Function
程序运行后,单击命令按钮,输出结果为
A.1
B.2
C.5
D.8
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
单击命令按钮时,下列程序代码的执行结果为 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
点击查看答案&解析
单项选择题
有以下函数过程: Function Gys(ByVal x As Integer,ByVal y As Integer)As Integer Do While y< >0 Remender=x Mod v x=y Y=Reminder Loop Gys=x End Function 以下是调用该函数的事件过程,该程序的运行结果是 Private Sub Command1_Click( ) Dim a As Integer Dim b As Integer a=50 b=10 x=Cys(a,b) Print x End sub
A.0
B.10
C.50
D.100
点击查看答案&解析
相关试题
有如下程序段,该程序段执行完后,共执行循...
设有如下程序: Private Static Functio...
单击命令按钮时,下列程序的运行结果为 Pr...
单击按钮时,以下列程序运行后的输出结果是...
在窗体中添加两个文本框(其Name属性分别为...