发布网友 发布时间:2022-05-18 02:59
共1个回答
热心网友 时间:2023-10-08 14:12
#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);}追问这对吗?