请问空格的数量怎么跟总数量一样多啊?
#include"stdio.h"void main()
{
int zongshu=0,zimushu=0,shuzishu=0,kongge=0;
char c;
while((c=getchar())!='\n')
{
zongshu+=1;
if(c>='0'&&c<='9')
{
shuzishu+=1;
}
if(c>='A'&&c<'Z'||c>='a'&&c<='z')
{
zimushu+=1;
}
if(c=' ')
{
kongge+=1;
}
}
printf("总数=%d\n数字数=%d\n字母数=%d\n空格数=%d\n",zongshu,shuzishu,zimushu,kongge);
}