Public Class Form1
Public Function IsPalindrome_new(src As String) As Boolean
Dim palindrome As Boolean = True
For i As Integer = 0 To src.Length \ 2
If src(i) <> src(src.Length - i - 1) Then
palindrome = False
Exit For
End If
Next
Return palindrome
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
If (IsPalindrome_new(strText.Text)) Then
result.Text = StrReverse(strText.Text)
MsgBox("word enterd is pallindrome")
Else
result.Text = StrReverse(strText.Text)
MsgBox("word enterd is NOT pallindrome")
End If
End Sub
End Class
if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)
2. Write a program that takes a word that a user enters into a textbox, and...
A palindrome is a word, phrase, number, or other sequence of symbols or elements that reads the same forward or reversed. Examples: “Dad”, “Anna”, “Never odd or even”, etc. For this problem, we will only consider a string to be palindromic if its combined alpha-numeric characters (‘A’-’Z’, ‘a’-’z’, and ‘0’-’9’) can be read the same both forward and backward, by skipping all other non-alphanumeric characters.Write the following function that takes a user input string, computes, and determines whether the input is palindromic or not...
Your program must prompt the user to enter a string. The program must then test the string entered by the user to determine whether it is a palindrome. A palindrome is a string that reads the same backwards and forwards, such as "radar", "racecar", and "able was I ere I saw elba". It is customary to ignore spaces, punctuation, and capitalization when looking for palindromes. For example, "A man, a plan, a canal. Panama!" is considered to be a palindrome....
Today you are to write a Java program that will prompt for and read 2 words of equal length entered by the user, and create a new word which contains the last letter of the 1st word, the last letter of the 2nd word, followed by the second to last character of the 1st word, followed by the second to last character of the 2nd word and so on. Be sure to use the same format and wording as in...
In the original flashcard problem, a user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting. A sample session might run as follows: Enter s to show a flashcard and q to quit: s Define: word1 Press return to see the definition definition1 Enter s to show a flashcard...