Wednesday, May 9, 2007

Palindrome

private void btCheck_Click(object sender, System.EventArgs e)
{
char[] Temp = TextBox1.Text.ToCharArray();
Array.Reverse(Temp);
string str = new String(Temp);
if(str == TextBox1.Text)
{
Response.Write(@"<script>alert('Palindrome')</script>");
}
else
{
Response.Write(@"<script>alert('!Palindrome')</script>");
}
}



No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.