Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to find whether the given number is a palindrome number or not

Posted By: Adelaide Fischer     Category: C Programming     Views: 14622

Write a program to find whether the given number is a palindrome number or not.

Code for Program to find whether the given number is a palindrome number or not in C Programming

       # include<stdio.h>
       void main()
       {
           long n,rev,t;
           int r;
           clrscr();
           printf("Enter number : ");
           scanf("%ld",&n);
           t=n;
           rev=0;
           while(t>0)
           {
               r=t%10;
               rev=(rev*10)+r;
               t=t/10;
           }
           if(n==rev)
               printf("Number is palindrom");
           else
               printf("Number is not palindrom");
           getch();
       }
  
Share: 



Adelaide Fischer
Adelaide Fischer author of Program to find whether the given number is a palindrome number or not is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!