Search This Blog

Showing posts with label programme to check that given number is palindrome or not. Show all posts
Showing posts with label programme to check that given number is palindrome or not. Show all posts

Thursday, February 10, 2011

Programme to check that given number is palindrome or not

#include<stdio.h>
#include<conio.h>
void main()
{
int n,d,r=0,t;
printf("enter value");
scanf("%d",&n);
t=n;
while(n>0)
{
d=n%10;
r=r*10+d;
n=n/10;
}
if(t==r)
printf("%d is palindrome number",t);
else
printf("%d isnt palingdrome number",t);
getch();
}