#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,t,s=0;
clrscr();
printf("Enter the number of value:");
scanf("%d",&a);
n=a;
while(n>0)
{
t=n%10;
s=s*10+t;
n=n/10;
}
if(a==s)
{
printf("given %d number is palindrome",a);
}
else
{
printf("not palindrome");
}
getch();
}
#include<conio.h>
void main()
{
int a,n,t,s=0;
clrscr();
printf("Enter the number of value:");
scanf("%d",&a);
n=a;
while(n>0)
{
t=n%10;
s=s*10+t;
n=n/10;
}
if(a==s)
{
printf("given %d number is palindrome",a);
}
else
{
printf("not palindrome");
}
getch();
}
No comments:
Post a Comment