[填空题] 当下列程序运行,单击窗体后,分别输入72和24,信息框上显示的结果是______。 Private Sub Form_Click( )   Dim x As Integer, y A

18 查阅

[填空题] 当下列程序运行,单击窗体后,分别输入72和24,信息框上显示的结果是______。

Private Sub Form_Click( )

  Dim x As Integer, y As Integer

  x = Val(InputBox("输入整数72"))

  y = Val(InputBox("输入整数24"))

  z = fun1(x, y)

  MsgBox Str(z)

End Sub

Private Function fun1(ByVal a As Integer, ByVal b As Integer)As Integer

  Do

    r = a Mod b

    a = b

    b = r

  Loop Until r = 0

  fun1 = a

End Function

参考答案:

X

计算机考试