下列函数过程的作用是计算x和y的最大公约数。请填空。 Private Sub Command1_ Click() Dim x As Integer, y As Integer, Result As Integer x = InputBox (“请输入第一

admin2009-07-23  28

问题 下列函数过程的作用是计算x和y的最大公约数。请填空。
Private Sub Command1_ Click()
Dim x As Integer,  y As Integer, Result As Integer
x = InputBox (“请输入第一个数”)
y = InputBox (“请输入第二个数”)
Result =______
Print x; "和"; y; "的最大公约数为: "; Result
End Sub
Private Function GYS (ByVal A As Integer,  ByVal B As Integer)
Dim T As Integer
T = A Mod B
Do While ______
A = B
B = T
T = A Mod B
Loop
______
End Function

选项

答案GYS (x,y) , T<>0 , GYS=B

解析
转载请注明原文地址:https://jikaoti.com/ti/JPq0FFFM
0

最新回复(0)