Powered by Blogger.

Sunday 7 August 2016

Console Application VB.NET - Palindrome Or Not

Palindrome Or Not - Console Application

He Guys

Today We are going to make a console application which will ask user to enter a string and the program will check whether the word is palindrome or not....


Palindrome Meaning

palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward.

Images For Palindrome -



To Learn How to Make this type of console application click the below link -

Console Application VB.NET - Palindrome Or Not


Coding Part

Module Module1

    Sub Main()
        Dim Name As String
        Dim pName As String
        Console.WriteLine("Enter a string : ")
        Name = Console.ReadLine()
        pName = StrReverse(Name)
        If Name = pName Then
            Console.WriteLine("Its a Palindrome")
        Else
            Console.WriteLine("Its NOT a Palindrome")
        End If
        Console.ReadLine()
    End Sub


End Module


For More Videos Like This You Can Subscribe Our Youtube Channel
Name "Dark Coders" Or Click the below Image.




Thanks,
Visit Again
Regards - Dhiraj Bhatkar

About Dark Coders

Hi , We are Dark Coders A Group Of Noob Friendly Programmers

1 comments:

  1. can you possibly help me on my homework ? i tried to write correct code on vb.net console application but i could not handle
    here is my homework :
    Palmost. The fact that 2012 starts and ends with a 2 is slightly interesting, but the number would be more interesting if it were a palindrome, that is, it read the same in both directions, like 2002. It does seem that 2012 is closer to being a palindrome than 2013, though, because you can turn it into one by inserting a 1 after the first 2, whereas 2013 requires inserting at least three digits to become a palindrome, for example if you add 102 on the end you get the palindrome 2013102. Of course there's more than one way to make 2012 into a palindrome; we could also add the ten characters tappat2102 to the end to get a fourteen-character palindrome. But one is the fewest number of characters which can be inserted; there are two different ways to do it, inserting either a 1 or a 0. Any string of length n can be turned into a palindrome by adding at most n-1 characters. Strings which require fewer characters inserted to become a palindrome are more interesting and strings which are already palindromes will require zero characters to become one.
    For this problem, we'll give your program four different strings of characters, and for each string, the program should output the smallest number of characters needed to be inserted to turn the string into a palindrome.

    Sample input:
    2011
    2012
    2015
    android

    Output for Sample input:
    2
    1
    3
    4

    ReplyDelete