#include <stdio.h>
#include <string.h>
int main() {
char str[10];
scanf("%s",str);
int len = strlen(str);
for(int i = 0; i < len/2; i++) {
if(str[i] != str[len - i - 1]) {
printf("its not palindrome\n");
return 0;
}
}
printf("its palindrome\n");
return 0;
}
#if 0
int main(){
char a[10];
int i;
int temp=0;
scanf("%s",a);
for(i=0;a[i]!='\0';i++){}
for(int c=0;c<i;c++){
if(a[c]!=a[i-c-1]){
temp=1;
break;
}
}
if(temp==0){
printf("palindrome");
}
else{
printf("not a palindrome");
}
}
#endif
To embed this program on your website, copy the following code and paste it into your website's HTML: