过程问题

来源:百度知道 编辑:UC知道 时间:2024/06/26 00:58:14
function unc(byval x as integer,byval y%) as integer
do while y<>0
sic=x/y
x=y
y=sic
loop
unc=x
end function
这段是什么意思啊 如果x=12 y=2
UNC会是多少

可以把代码放到VB里检测下
Private Sub Form_Load()
Text1.Text = unc(12, 2)
End Sub
Function unc(ByVal x As Integer, ByVal y%) As Integer
Do While y <> 0
sic = x / y
x = y
y = sic
Loop
unc = x
End Function
结果是6