Private Sub Command1_Click()
Dim n1 As Single, n2 As Single, n3 As Single
n1 = Text1
n2 = Text2
n3 = n1 Mod n2
Text3 = n3
End Sub
Private Sub Command2_Click()
Dim n1 As Long, n2 As Long, n3 As Long
n1 = Text1
n2 = Text2
For k = 1 To n1 * n2 Step 1
If (k Mod n1 = 0) And (k Mod n2 = 0) Then
n3 = k
Exit For
End If
Next
Text3 = n3
End Sub
Private Sub Command3_Click()
Dim n1 As Long, n2 As Long, n3 As Long
n1 = Text1
n2 = Text2
For k = n1 * n2 To 1 Step -1
If (n1 Mod k = 0) And (n2 Mod k = 0) Then
n3 = k
Exit For
End If
Next
Text3 = n3
End Sub
Dim n1 As Single, n2 As Single, n3 As Single
n1 = Text1
n2 = Text2
n3 = n1 Mod n2
Text3 = n3
End Sub
Private Sub Command2_Click()
Dim n1 As Long, n2 As Long, n3 As Long
n1 = Text1
n2 = Text2
For k = 1 To n1 * n2 Step 1
If (k Mod n1 = 0) And (k Mod n2 = 0) Then
n3 = k
Exit For
End If
Next
Text3 = n3
End Sub
Private Sub Command3_Click()
Dim n1 As Long, n2 As Long, n3 As Long
n1 = Text1
n2 = Text2
For k = n1 * n2 To 1 Step -1
If (n1 Mod k = 0) And (n2 Mod k = 0) Then
n3 = k
Exit For
End If
Next
Text3 = n3
End Sub