[填空题] 有如下函数过程: Function gys(By Val x As Integer, ByVal y As Integer) As Integer
2021-07-20
[填空题] 有如下函数过程:
Function gys(By Val x As Integer, ByVal y As Integer) As Integer
Do While y<>0
preminder=x/y
x=Y
y=preminder
Loop
gys=x
End Function
以下是调用该函数的事件过程:
Private Sub Command1_Click
Dim a As Integer,b As Integer
a=10;b=2
x=gys(a,b)
Print x
End Sub
该程序的运行结果是______。
正确答案:E
参考解析:本题的难点是Do While…Loop循环控制问题。y=2、5、0.4的过程中,最后x=5。
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
