用辗转相除法求两个自然数m,n的最大公约数和最小公倍数的vb程序编写

问题描述:

用辗转相除法求两个自然数m,n的最大公约数和最小公倍数的vb程序编写

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 ...