[填空题] 下列程序的功能是计算两个自然数的最大公约数,如图1所示。给定的程序不完整,将程序补充完整。
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
正确答案:fum1=b
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)