Thursday, April 21, 2011

HP Quicktest VBScript Palindrome

Write the below written QTP code inside a notepad and save it as a .vbs file. You can 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

No comments:

Post a Comment