#include<stdio.h> int main(void) { int yinwen,shuzi,koge,other; char ch; int i; yinwen=shuzi=koge=other=0; printf("Enter 15 characters:"); for(i=1;i<=15;i++){ ch=getchar( ); if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z')) yinwen++; else if(ch>='0'&&ch<='9') shuzi++; else if(ch>=' '&&ch<=' ') koge++; else other++; } printf("yinwen=%d,shuzi=%d,koge=%d,other=%d ",yinwen,shuzi,koge,other); return 0; }