下列VB 程序用于求2个正整数(均小于10000)的最大公约数: Private Sub Command1_Click()
Dim x As Integer,y As Integer,z As Integer
x=Val(Text1.Text) ‘第1个正整数
y=Val(Text2.Text) ‘第2个正整数
‘调用函数gcd
Text3.Text=Str(z)
End Sub
Function gcd(a As Integer, b As Integer) As Integer
Do While a <> b
If a>b Then a=a-b Else b=b-a
Loop
gcd=b
End Function
方框中的正确语句是( )