[填空题] 下列程序的功能是计算两个自然数的最大公约数,界面如下图所示。给定的程序不完整,将程序补充完整。 Private Sub Command1_Click() Dim x As Long,
18 查阅
[填空题] 下列程序的功能是计算两个自然数的最大公约数,界面如下图所示。给定的程序不完整,将程序补充完整。
Private Sub Command1_Click()
Dim x As Long, y As Long,i As Long
x=Val(Text1.Text)
y=Val(Text2.Text)
Text3.Text = Str( 【13】 )
End Sub
Function fun1(a As Long,b As Long)As Long
Dim r As Long
Dim t As Long
If 【14】 Then
t = a
a = b
b = t
End If
r = a Mod b
Do While r <> 0
a = b
b = r
r = a Mod b
Loop
【15】
End Function
参考答案: