By Ramarathna PaVaN Kumar.....
My Pages..
Home
C - Programming
JoKe$
Sunday, November 28, 2010
write a program to find given number is palidrome or not by using while loop?
#include
#include
main()
{
int n,t,s,r;
printf(“Ent er any number:”);
scanf(“%d”,&n);
t=n;
s=0;
while (n>0)
{
r=n%10;
s=(s*10)+r;
n=n/10;
}
if(t==s)
printf(“%d is a Palindrome number”, t);
else
printf(“%d is not a Palindrome number”, t);
getch();
}
Newer Post
Older Post
Home