int main(){ char c[50]; int i,el=0,sp=0,nu=0,other=0; gets(c);//输入字符串 for(i=0; i<strlen(c); i++)//strlen返回字符串长度 { if((c[i]>='A' && c[i]<='Z')||(c[i]>='a' && c[i]<='z')) el++; else if(c[i]>='0'...
include <stdio.h>int main(){ int space=0,number=0,others=0; char str[1000]; char nextchar = 0; printf("输入任意文字:\n"); scanf("%s", str); printf("输入内容:%s\n", str); getchar();//ignore enter for(;nextchar!='\n';) { scanf("%c...
空格:3个。其他字符:4个。Press any key to continue*/#include <stdio.h> include <string.h>int main () { char capitals = 0,lowercases = 0,digits = 0;char spaces = 0,other = 0,length,i,c,s[200];printf("请输入字符串:");gets(s);length = strlen(s);for (i = 0;i...
比如长度为100,用gets()函数将输入内容读入数组,定义两个char类型指针,分别指向数组中字符的头尾,然后...