RT。。。
用函数的我写出来了。。不过子程序始终不对。。
函数如下
Private Sub Command1_Click()
Dim x%, y%, c&
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = MaxGY(x, y)
End Sub
Function MaxGY(x As Integer, y As Integer)
Dim Temp As Integer
Temp = x Mod y
If Temp = 0 Then
MaxGY = y
Else
MaxGY = MaxGY(y, Temp)
End If
End Function
求帮忙啊·
用函数的我写出来了。。不过子程序始终不对。。
函数如下
Private Sub Command1_Click()
Dim x%, y%, c&
x = Val(Text1.Text)
y = Val(Text2.Text)
Text3.Text = MaxGY(x, y)
End Sub
Function MaxGY(x As Integer, y As Integer)
Dim Temp As Integer
Temp = x Mod y
If Temp = 0 Then
MaxGY = y
Else
MaxGY = MaxGY(y, Temp)
End If
End Function
求帮忙啊·