我这个哪里出毛病了?
#include<stdio.h>
int main()
{
char c;
int count1=0,count2=0,count3=0,count4=0,count5=0;
while((c=getchar())!='\n')
if(c>='a'&&c<='z')
count1++;
else if(c>='A'&&c<='Z')
count2++;
else if(c=' ')
count3++;
else if(c>='0'&&c<='9')
count4++;
else count5++;
printf("zhongwen=%d,yingwen=%d,kongge=%d,shuzi=%d,qita=%d\n",count1,count2,count3,count4,count5);
return 0;
}
#include<stdio.h>
int main()
{
char c;
int count1=0,count2=0,count3=0,count4=0,count5=0;
while((c=getchar())!='\n')
if(c>='a'&&c<='z')
count1++;
else if(c>='A'&&c<='Z')
count2++;
else if(c=' ')
count3++;
else if(c>='0'&&c<='9')
count4++;
else count5++;
printf("zhongwen=%d,yingwen=%d,kongge=%d,shuzi=%d,qita=%d\n",count1,count2,count3,count4,count5);
return 0;
}