#include <stdio.h>
int main() {
int n;
while(1) {
int num_list[5]={0};
int i=0,num_len=0,is_pal=1;
scanf("%d",&n);
if(n==0) return 0;
while(n>0) {
num_list[i]=n%10;
n=n/10;
i++;
num_len++;
}
for(int j=0; j<num_len/2; j++) {
if(num_list[j]!=num_list[num_len-1-j]) {
is_pal=0;
break;
}
}
if(is_pal) printf("yes\n");
else printf("no\n");
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: