Originally posted by 14520758
View Post
PHP Code:
#include <stdio.h>
#include <string.h>
main()
{
char str[100];
int i, j, dodai;
while (gets(str)!=NULL)
{
if (strlen(str)==0) break;
int kt=1;
dodai= strlen(str);
for(i=0; i<dodai;i++)
if (str[i]!=str[dodai-1-i])
{
printf("1\n");
kt=0;
break;
}
if (kt==1) printf("0\n");
}
}
Comment