hsx1314520
char *cp = " your input world "; char buf[512] = {0}; int i = 0; int world = 0; while(*cp != '\0') { //删除句子的前导空格和多余的中间空格 for(;(*cp == ' ' || *cp == '\t' ) && *cp != '\0'; cp++); for(;(*cp != ' ' && *cp != '\t' ) && *cp != '\0'; cp++){ buf[i++]=*cp; } if(*cp == '\0'){ buf[i]='\0'; break; }else{ buf[i++]=*cp; } } //删除句子的后导空格 if(i>1 && (buf[i-1] == ' ' || buf[i-1] == '\t')) { buf[i-1]='\0'; } printf("%s\n",buf);
titilovesanny
是不是这个?输入一个英语句子: l lll lllll lllll l lllll lll lllll lllll l llll#include
镜SHOW公主
Because of snow, passengers had to wait in the terminal until night.Winners always use most times to try to finishe other 20% the main things. Dr Douglas's pain cause him to understand the question profoundly, which who is us.(注意开头字母要大写,这也是改错)
吉果0412
00:00:8,400 --> 00:00:12,680五点了It's 1700 hours. 00:00:15,200 --> 00:00:18,080孩子们,出发!Boys, let's go! 删除之后最后的结果是什么呢?