using System;
public class Program
{
public static void CheckIfPalindrome(int num)
int reminder,sum =0 ,temp;
temp = num;
while(num > 0)
reminder = num % 10 ;
num = num / 10; //for getting quotient by dividing with 10
sum = sum * 10 + reminder;
}
if (temp == sum) //checking whether the reversed number is equal to entered number
Console.WriteLine("\n Number is Palindrome \n\n");
} else {
Console.WriteLine("\n Number is not a palindrome \n\n");
public static void Main()
CheckIfPalindrome(121);