【说明】
设串s和串t采用顺序存储结构,编写函数实现串s和串t的比较操作,要求比较结果包括大于、小于和等于3种情况。
【函数】
int StrCompare(SStrType s, SStrType t)
int n=s.length, m= (1) , i,j,tag;
i=0; j=0;
while( (2) )
if( (3) )
i++;
j++;
else if(s.str[i]>t.str[j])
tag=1;
return tag;
else
tag=-1;
return tag;
if(n==m)
tag=0;
else if( (4) )
tag=1;
else if(n<m)
tag=-1;
(5) ;