#include<string.h>
#include<stdio.h>
char a[50][80]={"sun","sunx",",;wsfadf","xxx","cccc"},temp[80];
void DELWORD()
{
int i=0,j,k;
int x;
char w[]={' ',',','.',';',':','\'','\"','?','!','\0'};
for(x=0;a[x][0];x++);
while(i<x)
{
if(strlen(a[i])%2) { x--; for(j=i;j<x;j++) strcpy(a[j],a[j+1]); memset(a[x],0,80); i--;}
else
{
for(j=0;a[i][j];j++)
{
k=0;
while(w[k]) { if(a[i][j]==w[k]) { k=0; break; } k++; }
if(!k) { for(k=j;a[i][k];k++) a[i][k]=a[i][k+1]; j--; }
}
}
i++;
} i=0;
while(i<x/2) { strcpy(temp,a[i]); strcpy(a[i],a[x-i-1]); strcpy(a[x-i-1],temp); i++;}
}
int main(void)
{
int i;
DELWORD();
for(i=0;i<3;i++) printf("%s,",a[i]); putchar('\n');
while(1);
return 0;
}
My Blog: www.aiexp.info
虽然我的路是从这里开始的,但是这里不再是乐土.感谢曾经影响过,引导过,帮助过我的董凯,飞燕,leeco,starwing,Rockcarry,soft_wind等等等等.别了,BCCN.