[填空题] 有如下函数过程:
Function gys(ByVal 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
以下是调用该函数的事件过程,该程序的运行结果是 (9) 。
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。

![[填空题] 有如下函数过程: Function gys(ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 prem [填空题] 有如下函数过程: Function gys(ByVal x As Integer, ByVal y As Integer) As Integer Do While y<>0 prem](http://www.mshxw.com/aiimages/31/254414.png)
