A C program to Check the given number is paliandrome or not
#include<stdio.h>
#include<conio.h>
void main()
{
int no,re,ron=0,keep;
clrscr();
printf("Enter a number");
scanf("%d",&no);
keep=no;
while(no!=0)
{
re=no%10; `
no=no/10;
ron=ron*10+re;
}
if(ron==keep)
{
printf("The given number is a palliyandrome ");
}
else
{
printf("The given number is not a palliyandrome ");
}
getch();
}
|