用辗转相除法求两个自然数m,n的最大公约数和最小公倍数的vb程序编写
人气:472 ℃ 时间:2020-02-06 09:38:37
解答
Private Sub command1_click()Dim m As Integer,n As IntegerDim a As Integer,b As IntegerDim r As Integerm = InputBox("输入m")n = InputBox("输入n")a = mb = nDor = Abs(m - n)m = nn = rLoop While m nPrint ...
推荐
猜你喜欢