Sub test()
a = 144
b = 60
c = NOD(a, b)
a = a / c
b = b / c
End Sub
Function NOD(ByVal a, ByVal b) As Integer
Do While a <> 0 And b <> 0
If a > b Then
a = a Mod b
Else
b = b Mod a
End If
Loop
NOD = a + b
End Function
Sub test()
a = 144
b = 60
c = NOD(a, b)
a = a / c
b = b / c
End Sub
Function NOD(ByVal a, ByVal b) As Integer
Do While a <> 0 And b <> 0
If a > b Then
a = a Mod b
Else
b = b Mod a
End If
Loop
NOD = a + b
End Function