Friday, November 19, 2010

VBScript Code - Finding whether a string is Palindrome or Not

Write the below code in a notepad and save it as a .vbs file. Either run it from command prompt or run it by double-clicking on it.

VBScript Code - Finding whether a string is Palindrome or Not.

x=inputbox("enter a string")
if x= strreverse(x) then
  msgbox "Its a Palindrome"
else
  msgbox "Its NOT a Palindrome"
End if