Method- 1
-----------------------------------
Xstring=inputbox("enter a string")
if xString= strreverse(xString) then
msgbox "Its a Palindrome"
else
msgbox "Its NOT a Palindrome"
End if
Method-2
----------------------------------------
MyStr=Ucase(inputbox("Enter the String:"))
RevStr=strreverse(MyStr)
if strcomp(MyStr,RevStr)=0 then
msgbox "It is a Palindrome"
else
msgbox "It is not a Palindrome"
end if
-----------------------------------
Xstring=inputbox("enter a string")
if xString= strreverse(xString) then
msgbox "Its a Palindrome"
else
msgbox "Its NOT a Palindrome"
End if
Method-2
----------------------------------------
MyStr=Ucase(inputbox("Enter the String:"))
RevStr=strreverse(MyStr)
if strcomp(MyStr,RevStr)=0 then
msgbox "It is a Palindrome"
else
msgbox "It is not a Palindrome"
end if
No comments:
Post a Comment
Note: only a member of this blog may post a comment.