高手来指教下哦。。刚学VB
Private Sub Command1_Click()Dim a%, c As String
a = Text1.Text
Call gcd(a, c)
Label1.Caption = c
End Sub
Sub gcd(h%, c As String)
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
运行结果有问题的不管输什么数都是显示该数是回文数 谁帮我改下啊 改好了调试成功再发出来!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!