第2个回答 2009-03-26
你先判断所求的数十几位数,如果为奇数位(比如3)位数,则判断left(text1,(len(text1)-1)/2)是否等于right(text1,len(text1)/2),如果等于则是回文数。另外的偶数位的你也可以参照这个。哎,我再给你全部编出来吧:
if len(text1) mod 2<>o then
if left(text1,(len(text1)-1)/2)=right(text1,(len(text1)-1)/2) then
msgbox("shi")
else
msgbox("bushi")
end if
else
if left(text1,len(text1)/2)=right(text1,len(text1)/2) then
msgbox("shi")
else
msgbox("bushi")
end if
end if