#include<stdio.h>
int main()
{
char x;
int s=0,k=0,z=0,sum=0;
while((x=getchar())!='\n')//【while((getchar())!='\n');
{
//x=getchar();】出问题
if(x>='0'&&x<='9')s++;
else if(x==' ')k++;
else if(x>='a'&&x<='z'||x>='A'&&x<='Z')z++;
sum++;
}
printf("%d %d %d %d",s,k,z,sum);
return 0;
}
【假期练习2.17】有多少符号
最新推荐文章于 2024-03-14 16:05:05 发布