#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include <string.h>
int main(void)
{
int i = 0;
char c[20];//如果字符过长编译器会自动补充,然后再给足8个字节的保护空间
char tmp,d[20];
//scanf("%s", &c);
//printf("%s\n", c);
gets(c);
strcpy(d, c);
int len = strlen(c)-1;
//printf("该字符串的数组下标为%d\n", len);
while (c[i] != '\0')
{
tmp = c[i];
c[i] = c[len];
c[len] = tmp;
//printf("i=%d len=%d", i, len);
len--;
i++;
if (len < i)
{
break;
}
}
// puts(c);
if (strcmp(d, c) < 0)
{
printf("-1");
}
else if (strcmp(d, c) > 0)
{
printf("1");
}
else
{
printf("0");
}
return 0;
}
03-07
2723
12-31
676