How to check if a given number is a Palindrome in C#
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
C#
🤖 Code Explanation
The program takes an integer input from the user and stores it in the variable num. Then, a copy of the original number is stored in the variable temp.
The while loop calculates the reverse of the number and stores it in the variable sum.
Finally, the if-else statement checks whether the number is equal to its reverse or not. If it is equal, then it is a palindrome number, otherwise, it is not.
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
More problems solved in C#
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)
![](https://cdn-icons-png.flaticon.com/512/6132/6132221.png)