#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)
#include<stdio.h>
#include<string.h>
int main()
{
int bigcount = 0;
int smallcount = 0;
int num = 0;
char str[100];
printf("请输入一串字符串:");
scanf("%s", str);
for (int i = 0; i < strlen(str); i++)
{
char res = str[i];
if ('a' <= res && res <= 'z')
{
smallcount++;
}
else if ('A' <=res && 'Z' >=res)
{
bigcount++;
}
else if ('0' <= res && '9' >= res)
{
num++;
}
}
printf("大写字符个数为%d 小写字符个数为%d 数字为%d", bigcount, smallcount, num);
return 0;
}