Tuesday, July 16, 2019

Palindrome number

Palindrome number

Palindrome Number

#include<stdio.h>
#include<conio.h>

void main()
{
int no,rev=0,temp;
clrscr();
printf("Enter The Number :- ");
scanf("%d",&no);

temp=no;

while(temp !=0)
{
rev =rev*10;
rev=rev+temp%10;
temp=temp/10;

}
if(no== rev)
{
printf("%d is a palindrom number. \n",no);
}
else
{
printf("%d is not a palindrom number. \n",no);
}

getch();

}

Output:


Palindrom Number


EmoticonEmoticon