Sub HOK()
Dim c As Long, NOK As Long
a = CInt(InputBox("Введите первое число"))
b = CInt(InputBox("Введите второе число"))
If a = b Then
NOK = a
Else
c = a * b
Do
If a > b Then a = a - b Else b = b - a
Loop Until a = b
NOK = c / a
End If
MsgBox "НОК=" + Str(NOK)
End Sub