哆啦的时光机
#include <stdio.h>#include <string.h>#define n 50void main(){ int i=0,littlechar=0,bigchar=0,space=0,num=0,other=0;char a[n];gets(a);while(a[i]!='\0'){if(a[i]>='a'&&a[i]<='z') littlechar++;else if(a[i]>='A'&&a[i]<='Z') bigchar++;else if(a[i]>='0'&&a[i]<='9') num++;else if(a[i]=='') space++;else other++;i++;}printf("大写字母%d\n小写字母%d\n空格%d\n数字%d\n其他%d\n",bigchar,littlechar,space,num,other);}