展开全部
Dim Z As Integer
Private Sub Form_Click()
Dim A As String, B As String
Form1.Cls
Form1.AutoRedraw = True
A = Val(text1.text)
B = Val(text2.text)
If A > B Then Call Zd(A, B) Else Call Zd(B, A)
picture1.Print a;"和";b;"的最大公因数是:";Z
End Sub
Private Sub Zd(ByVal X As Integer, ByVal Y As Integer)
Dim T As Integer
If X Mod Y = 0 Then
Z = Y
Else
Call Zd(Y, X Mod Y)
End If
End Sub
已经运行过。
Private Sub Form_Click()
Dim A As String, B As String
Form1.Cls
Form1.AutoRedraw = True
A = Val(text1.text)
B = Val(text2.text)
If A > B Then Call Zd(A, B) Else Call Zd(B, A)
picture1.Print a;"和";b;"的最大公因数是:";Z
End Sub
Private Sub Zd(ByVal X As Integer, ByVal Y As Integer)
Dim T As Integer
If X Mod Y = 0 Then
Z = Y
Else
Call Zd(Y, X Mod Y)
End If
End Sub
已经运行过。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |