<stdio.h>
scomp(char *s1,char *s2)
{int i;
i=0;
while(s1[i] == s2[i] && s1[i])i++;
return (s1[i]-s2[i]);
}
main()
{
char str1[] = "ABC",str2[10];
gets(str2);
if(scomp(str1,str2)>0)
printf("str1>str2\n");
else if(scomp(str1,str2)<0)
printf("str1<str2\n");
else
printf("str1=str2\n");
}
scomp(char *s1,char *s2)
{int i;
i=0;
while(s1[i] == s2[i] && s1[i])i++;
return (s1[i]-s2[i]);
}
main()
{
char str1[] = "ABC",str2[10];
gets(str2);
if(scomp(str1,str2)>0)
printf("str1>str2\n");
else if(scomp(str1,str2)<0)
printf("str1<str2\n");
else
printf("str1=str2\n");
}