---
title: "Write a C# Program to check a number is Palindrome or not."  
description: "Write a C# Program to check a number is Palindrome or not."  
author: "Steilla Mitchel"  
published: 2021-11-22  
updated: 2021-11-22  
canonical: https://www.mindstick.com/forum/156860/write-a-c-sharp-program-to-check-a-number-is-palindrome-or-not  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Write a C# Program to check a number is Palindrome or not.

Write a C# [Program to check](https://www.mindstick.com/forum/157542/write-a-java-program-to-check-if-a-list-of-integers-contains-only-odd-numbers) a number is Palindrome or not. give an example?.

## Replies

### Reply by Ashutosh Kumar Verma

## 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.

```
Ex- 	12321, 45654, 11211 etc.
```

## [Program](https://www.mindstick.com/blog/12337/scaling-up-your-mentorship-program):

```
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
```

\


---

Original Source: https://www.mindstick.com/forum/156860/write-a-c-sharp-program-to-check-a-number-is-palindrome-or-not

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
