从键盘输入一串字符,以回车结束,编程实现下列功能: (1)统计输入的数字字符、大写字符、小写字符以
#include "stdio.h" main(){char c,sum1=0,sum2=0,space=0,number=0,other=0;c=getchar();while(c!='\n'){if(c='A'c='Z') sum1++;else if(c='a'c='z') sum2++;else if(c='0'c='9') number++;else if(c==' ') space++;else other ++;c=getchar();}printf("%d,%d,%d,%d,%d",sum1,sum2,space,number,other);}