A Palindrome number is a number which are same as its reverse order means if we reverse a number and no any changes in sequence of that number as its original sequence then it called as a palindrome number.
In other word, it has same reads in sequence of forward and backward.
using System;
public class Program
{
public static void Main()
{
int number;
Console.WriteLine('Enter a number to check whether is Palindrome or not');
number= int.Parse(Console.ReadLine());
int num=number;
int i,result=0,rem;
while(num!=0)
{
rem=num%10;
result=result*10+rem;
num=num/10;
}
if(number==result)
{
Console.WriteLine(number+' is a Palindrome number');
}else
{
Console.WriteLine(number+' is not a Palindrome number ');
}
}
}
Output:
Enter a number to check whether is Palindrome or not
12321
12321 is a Palindrome number
Enter a number to check whether is Palindrome or not
789654
789654 is not a Palindrome number
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Palindrome Number:
A Palindrome number is a number which are same as its reverse order means if we reverse a number and no any changes in sequence of that number as its original sequence then it called as a palindrome number.
In other word, it has same reads in sequence of forward and backward.
Program:
Output: