回复 12楼 zshurui
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main(){
char a;
int i,shuzi=0,zimu=0,fuhao=0;
printf("请输入30个字符");
for (i=0;i<30;i=i+1){
scanf("%c",&a);
int j=a;
if (47<j&&j<58){
shuzi++;
}else if (59<j&&j<123){
zimu++;
}else {
fuhao++;
}
}
printf("数字个数=%d\n字母个数=%d\n符号个数=%d",shuzi,zimu,fuhao);
return 0;
}