Header Ads

Learn Together, Stay Connected.

প্যালিন্ড্রোম - ২-C


#include <stdio.h>
#include<math.h>
int main()
{
int y,temp,rem,num=0;
scanf("%d",&y);
temp=y;
for( ;temp!=0; )
{
rem=temp%10;
num=num*10+rem;
temp=temp/10;
}
if(y==num)
{
printf("YES");
}
else
{
printf("NO");
}
return 0;
}

No comments

Theme images by Dizzo. Powered by Blogger.