level 1
QQT1991
楼主
3. 编写一个判断字符串是否是回文的函数过程,函数的返回值是一逻辑量,即:是回文返回True,不是回文返回False。所谓回文是指顺读与倒读都相同,例如“ABCDCBA”。
Private Function Judge(str As String) As Boolean
Dim i As Integer
i = Len(str)
For i = 1 To Len(str) \ 2
If Mid(str, i, 1) <> Mid(str, Len(str) + 1 - i
, 1) Then
Judge = False
Exit Function
End If
Next i
End Function
(7)(A)As Single (B)As String
(C)As Integer (D)As Boolean
(8)(A)str = "" (B)i = 0
(C)i = Len(str) (D)Judge = True
(9)(A)Len(str) - i (B)i
(C)Len(str) \ 2 (D)Len(str) + 1 - i
2013年07月02日 00点07分
1
Private Function Judge(str As String) As Boolean
Dim i As Integer
i = Len(str)
For i = 1 To Len(str) \ 2
If Mid(str, i, 1) <> Mid(str, Len(str) + 1 - i
, 1) Then
Judge = False
Exit Function
End If
Next i
End Function
(7)(A)As Single (B)As String
(C)As Integer (D)As Boolean
(8)(A)str = "" (B)i = 0
(C)i = Len(str) (D)Judge = True
(9)(A)Len(str) - i (B)i
(C)Len(str) \ 2 (D)Len(str) + 1 - i

