#include
void main() { char s[256],*p; int a,b,c,d;
gets(s); p=s; a=b=c=d=0;
while ( *p!=0 ) {
if ( *p>='A' && *p<='Z' ) a++;
else if ( *p==' ' ) b++;
else if ( *p>='0' && *p<='9' ) c++;
else d++;
p++;
}
printf("大写字母%d,空格%d,数字%d,其他%d。\n",a,b,c,d);
}
#include
void main() { char s[256],*p; int a,b,c,d;
gets(s); p=s; a=b=c=d=0;
while ( *p!=0 ) {
if ( *p>='A' && *p<='Z' ) a++;
else if ( *p==' ' ) b++;
else if ( *p>='0' && *p<='9' ) c++;
else d++;
p++;
}
printf("大写字母%d,空格%d,数字%d,其他%d。\n",a,b,c,d);
}