标签:
Private Sub Command1_Click() Dim m, n, r, s, b As Long m = Val(Text1.Text) n = Val(Text2.Text) r = m Mod n s = m * n Do While r <> 0 m = n n = r r = m Mod n Loop Label1.Caption = "最大公约数是" + Str(n) + ",最小公倍数是" + Str(s / n) End Sub
标签:
原文地址:http://www.cnblogs.com/KakagouLT/p/4446644.html