#include<stdio.h>
#include<ctype.h>
#include<string.h>
int upper(char a[])
{
int i,count=0;
for(i = 0;i < a[i];i++)
{
if(isupper(a[i]))
count++;
}
return count;
}
int lower(char a[])
{
int i,count=0;
for(i = 0;i < a[i];i++)
{
if(islower(a[i]))
count++;
}
return count;
}
int digit(char a[])
{
int i,count=0;
for(i = 0;i < a[i];i++)
{
if(isdigit(a[i]))
count++;
}
return count;
}
int graph(char a[])
{
int i,count=0;
for(i = 0;i < a[i];i++)
{
if(isgraph(a[i]))
count++;
}
return count;
}
int main()
{
char a[]="ABCDopde89675$%^&";
int m = upper(a);
int n = lower(a);
int q = digit(a);
int s = graph(a);
int k = s - (m + n + q);
printf("大写字母有%d个\n",m);
printf("小写字母有%d个\n",n);
printf("特殊字符有%d个\n",k);
printf("数字字符有%d个\n",q);
return 0;
}