Friday, 24 July 2015

C Program - To check the Pallindrome Number

C Program to check the 'Pallindrome Number' 



#include<stdio.h>
#include<conio.h>
void main()
{
int rem,temp,n,rev=0;
clrscr();
printf("\nEnter any number :- ");
scanf("%d",&n);
temp=n;
while(temp!=0)
{
rem=temp%10;
rev=rev*10+rem;
temp=temp/10;
}
if(n==rev)
{
printf("\nThe given number is pallindrome number");
}
else
{
printf("\nThe given number is non-pallindrome number");
}
getch();
}

Output:-



Back to 'C Language Programs'

No comments:

Post a Comment