Private Function zdgys(n1 As Long, n2 As Long) As Long Dim tmp As Long If n1 < n2 Then tmp = n1 n1 = n2 n2 = tmp End If tmp = n1 Mod n2 If tmp Then zdgys = zdgys(n2, tmp) Else zdgys = n2 End If End Function Private Sub Command1_Click() MsgBox zdgys(36, zdgys(48, zdgys(72, zdgys(54, zdgys(12, zdgys(24, zdgys(30, zdgys(18, zdgys(42, 72)))))))))'好多括号啊End Sub
Dim tmp As Long
If n1 < n2 Then
tmp = n1
n1 = n2
n2 = tmp
End If
tmp = n1 Mod n2
If tmp Then
zdgys = zdgys(n2, tmp)
Else
zdgys = n2
End If
End Function
Private Sub Command1_Click()
MsgBox zdgys(36, zdgys(48, zdgys(72, zdgys(54, zdgys(12, zdgys(24, zdgys(30, zdgys(18, zdgys(42, 72)))))))))'好多括号啊End Sub