Skip to content

Palindrome

SIYASANGA KENKE

Asked Feb 27, 2006, 6:24 AM EST1 answer
Share
LinkedInX
I desperatly need the code on testing if a string is a palindrome using vb.net console application.I have searched every where and was only assisted in java.
please help me.
this assignment is due on Thursday and today is Monday the 27 Feb 2006
Thanx
Sma

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0

    Don't expect anyone to do your homework assignment for you.

    Here is one way to do it:  First get the length of the string and save each character to an array.  Reverse the array and copy the characters to a new string variable.  Then compare the original string to the reverse string (keeping all the characters either upper or lowercase).  If it matches, then it's a palindrome.

    Another way:  Use a For loop stepping backwards from the length of the string.  Extract each letter using the value of the control variable and concatenate it to a new string.

    0