谁帮我找下错误啊 编译完了 每次运行结果都是回文数?
Private Sub Command2_Click()Dim a As Integer, c As String
a = Text1.Text
Call gcd(a, c)
Label1.Caption = c
End Sub
Sub gcd(h%, c)
Dim i
Dim e
Dim a As String
Dim b As String
f = Trim(Str(h))
e = Len(f)
For i = 1 To (n \ 2)
a = Mid(f, i, 1)
b = Mid(f, e - i + 1, 1)
If a <> b Then Exit For
Next i
If i > (n \ 2) Then
c = "该数是回文数"
Else
c = "该数不是回文数"
End If
End Sub
所谓的回文数例如12321就是个回文数,即对称