Write a program to check whether the given number is a palindrome or not using DO - WHILE loop
#include < stdio.h>
#include < conio.h>
void main()
{
intn,a,r,s=0;
printf("\n Enter The Number:");
scanf("%d",&n);
a=n;
//LOOP TO FIND REVERSE OF A NUMBER
do
{
r=n%10;
s=s*10+r;
n=n/10;
}while(n>0);
/* CHECKING IF THE NUMBER ENTERED AND THE REVERSE NUMBER IS EQUAL
OR NOT */
if(a==s)
{
printf("\n %d is a Palindrome Number",a);
}
else
{
printf("\n %d is a not Palindrome Number",a);
}
}