THE 'C'- ARCHIE STYLE...
Thursday, March 31, 2011
number is palindrome or not
void main()
{
int n,a,r=0,t;
clrscr();
printf("enter the no.");
scanf("%d",&n);
t=n;
while(n!=0)
{
a=n%10;
n=n/10;
r=r*10+a;
}
if(r==t)
printf("palindrome");
else
printf("not palindrome");
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment