### Program 10:To find whether given number is palindrome or not

Program 10:

```#include<stdio.h>
main() ```
```{
int dummy,n,rev=0,x;
printf("Enter a number\n");
scanf("%d",&n);
dummy=n;
while(n>0)
{
x=n%10;
rev=rev*10+x;
n=n/10;
}
if(dummy==rev)
printf("The given number %d is a palindrome\n",rev);
else
printf("The given number %d is not a palindrome\n",rev);

}```
Explanation:
1. This is same as reversing a number which is Program 9 . To print reverse of a number
2. Just we used dummy variable to check whether the reversed number is same as the original one(i.e. 'n').
3. for example if n=321=dummy then the reverse rev=123.
4. As dummy is not equal to rev then the output is not a palindrome.(Here we can't use 'n' as it become 0 at the end of the loop which is why we are using a variable 'dummy' for temporary storage of the value).
Output:

 Donate Buy me a coffee \$2.00 USD Buy me a burger \$5.00 USD Buy me a pizza \$10.00 USD
 Compiler Used by me C-Free 5.0(Recommended) Other Compilers Code Blocks(Recommended) Online Compilers Ideone(Remember to give input before executing online where ever necessary)