Write a C Program to check whether number is palindrome or not

By | October 10, 2016

C Program to check whether number is palindrome or not


 

Write a C program to enter any number and check whether given number is palindrome or not using for loop. How to check whether a number is palindrome or not in C programming. C program for palindrome numbers.

Palindrome numbers

If a number remains same, even if we reverse its digits then the number is known as palindrome number. For example 12321 is a palindrome number because it remains same if we reverse its digits.

Algorithm

  1.  Get the number from user.

  2. Reverse it.

  3. Compare it with the number entered by the user.

  4. If both are same then print palindrome number

  5. Else print not a palindrome number.

For Example:

Enter a number: 121
Output: 121 is Palindrome

Here is source code of the C program to checks whether number is palindrome or not. The C program is successfully compiled and run on a Windows system. The program output is also shown below.


SOURCE CODE : :



OUTPUT : :


 

 

Leave a Reply

Your email address will not be published. Required fields are marked *