#include<conio.h>
#include<stdio.h>
main()
{
int n, m, temp=0;
clrscr();
printf("Enter the Number");
scanf("%d",&n);
m=n;
while(n>0)
{
temp=(temp*10)+n%10;
n=n/10;
}
if(m==temp)
printf("Palndrom");
else
printf("Not Palndrom");
getch();
}
#include<stdio.h>
main()
{
int n, m, temp=0;
clrscr();
printf("Enter the Number");
scanf("%d",&n);
m=n;
while(n>0)
{
temp=(temp*10)+n%10;
n=n/10;
}
if(m==temp)
printf("Palndrom");
else
printf("Not Palndrom");
getch();
}
No comments:
Post a Comment