Program to check the input number is palindrome or not


Module Module1

Sub Main()
'program to check whether the input number is palindrome or not

'declaring the variables
Dim entry, num, temp, reverse As Integer

Console.WriteLine("Enter the number youu want check as Palidrome or not")
entry = Console.ReadLine()

num = entry
While num <> 0
temp = num Mod 10
reverse = reverse * 10 + temp
num = num \ 10
End While
Console.WriteLine(reverse)
If entry = reverse Then
Console.WriteLine("The input number is a palindrome number")
Else
Console.WriteLine("The input number is not a palindrome number")
End If
Console.ReadKey()
End Sub

End Module

Comments

Popular posts from this blog

Program to extract vowel from the input string

Check whether the input number is arm-strong or not

Print the factorial value of an input number