|
int maxlen(char *word)
{
int len;
len=0;
while(*word)
{
if(*word==' ')
len=0;
else
len++;
word++;
}
return len;
}
void xixi(char *word)
{
int len,i,j,index;
len=maxlen(word);
index=0;i=j=0;
while(word)
{
if(word==' ')
index=i+1;
else
j++;
if(j==len)
{
while(word[index]!=' ') printf("%c",word[index++]);
printf("\n");
j=0;
} //if
word++;
} //while
}
//没有调试过,仅供参考 |
|