C语言编程>第二十三周 ⑥ 下列给定程序中函数fun的功能是:删除字符串s中的所有空白字符(包括Tab字符、回车符及换行符)。输入字符串时用 “#”结束输入。 C语言编程>第二十三周 ⑦ 请补充main函数,该函数的功能是:求n!。 C语言编程>第二十三周 ⑧ 下列给定程序中,函数fu...
include <stdio.h> include <string.h> include <ctype.h> define M 80 int main(){ char s[M];int len,flag;int i,j;printf("输入个数少于%d的字符串\n",M);gets(s);len=strlen(s);if(len>M){ printf("超过长度\n");return 1;} for(i=0,j=0;i<len;i++){ s[j]=...
} } return k;}int main(){ char s[999]; gets(s); strdel(s,'u'); strdel(s,'U') puts(s);}
//删除指针p所指字符串中的所有空白字符(包括制表符,回车符,换行符)输入字符时用‘#’结束输入。 1#include <string.h>2#include <stdio.h>3#include <ctype.h>4voidfun (char*p)5{inti,t;charc[80];6/***found***/7for(i =0,t =0; p[i] ; i++)8if(!isspace(*(p+i))) c[t++]=p...